I’ve recently been working on a project that needed use of the spree product assembly, but the users needed to be able to choose a recipe and ingredients. I used a combination of jQuery, JSON cookies, and some modifications to the product assembly to address this issue.
Because of a recent security issue with libyaml you may see the psych error:
You appear to have an outdated version of libyaml (0.1.4) installed on your system.
Prior to 0.1.6, libyaml is vulnerable to a heap overflow exploit from malicious YAML payloads.
I’m creating a basic pantry application which will be able to catalog current items in the user’s pantry. So, one of the pages needed will display different food items and the current quantities in the user’s pantry. A way to organize this data is to use a Bootstrap Panel to display the current totals and when the selected panel is clicked, individual data values will be displayed.
The data structure consists of Store, Producer, and Unit models, which all just consist of a name. Next, we have the Food model which has a name, upc, servings, serving_size, and references to a Producer and Unit. Finally, we have the Stock model which has a price, quantity, discount, bought, and references to Food, Store, and User (for the User I’m just using the basic Devise User model).
I’m doing a project where I need to import a spreadsheet, parse it, and then insert the data into the database. Now my first concern for finding a gem was that it could support more than one format of spreadsheet file. My second concern was that I wanted to be able to easily iterate over sheets, rows, and columns. My third and last concern was if it’s still being actively developed. While doing research for reading spreadsheet files I found 2 primary candidates.
The first candidate is the Spreadsheet gem. This was the first gem I tried and could easily iterate over sheets, rows, and columns. It was also still being actively developed. But the primary disadvantage is that it will only work with .xls files. Here is an example of how to use this spreadsheet gem to iterate over sheets and rows.