Rails, spree / 12.06.2014

Well, it is pretty straightforward you just need to add the favicon in the following locations: [shell] app/assets/images/favicon.ico and public/favicon.ico [/shell] And don't forget to add the tag in your header or your layout: [ruby] <%= favicon_link_tag image_path('favicon.ico') %> [/ruby] by the way you can generate a favicon in the following website: http://www.favicon.cc/ That's it you...

Rails, Ruby, spree / 04.04.2014

hello guys I want to write about selectors, overriding, and defaces in spree with the DSL for Spree: In this time I want to share the code that I have created for a simple task. The scenario is the following: I want to edit option type values in the admin section, if you take a look into the code of spree you'll see that some of the views responsible for the option type edition are located in: [shell] backend/view/spree/admin/option_types/_option_value_fields.html.erb [/shell] and [shell] backend/view/spree/admin/option_types/edit.html.erb [/shell]
cucumber, Rails, rspec, Ruby, spree, Testing, tumblr / 28.03.2014

Consuming Tumblr blog from your website using Ruby on Rails (Spree), Backbone and Tumblr Api You need to have an account on tumblr of course and generate the application to be able to consume the tumblr api: http://www.tumblr.com/oauth/apps About the default callback you can choose any url for example: http:://localhost:3000 Then generate the application oauth in the following url: https://api.tumblr.com/console/calls/user/info Add the following gem to your Gemfile: [ruby] gem 'tumblr_client' [/ruby]
Jquery, Rails, spree / 28.03.2014

Hey there, in this time I found the following resources and how to use it using curl or ajax calls for Spree: The most of the calls need to use the "X-Spree-Token" you can generate it from admin section eg: http://localhost:3000/admin from user section and is the token you need and also you can use for example the order token, I had problems with the api using that token if you have problems let me know. Products index of products 25 first [shell]curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products.json[/shell]
Rails, Ruby, spree / 26.03.2014

[ruby] namespace :banners do desc 'Populate default banners for homepage' task :populate => :environment do banner = Spree::BannerBox.find_by(category: 'box-1') unless banner 14.times do |x| box = "box-#{ x + 1 }" banner_values = { alt_text: '', url: '', category: box, banner_type: 'photo', enabled: true } banner = Spree::BannerBox.new(banner_values) banner.attachment = File.open(File.join(Rails.root, "app/assets/images/home/#{ box }.png")) banner.save! end # boxes type text 5.times do |box| box_category = "box-#{ box + 1 }-text" banner_values = { alt_text: '', url: '', banner_type: 'text', category: box_category, enabled: true } banner = Spree::BannerBox.new(banner_values) banner.attachment = File.open(File.join(Rails.root, "app/assets/images/home/#{ box_category }.png")) banner.save! end end end end [/ruby]