#154 Polymorphic Association (revised) May 19, 2012 | 11 minutes | Active Record , Routing A polymorphic association allows a model to belong_to different types of other models. Here I show how to make a single comment model belong to articles, photos, and events. Subscribe to Watch E...
E-commerce Tips 1.1 (namespacing) Posted by drhenner on May 19, 2012 — 1 comment I've been very frustrated when I see an app/controllers directory with a lack of namespaces. It's just wrong to not have any namespaces in an app that is large. I try to give me reasoning for why it is wr...
An ActiveRecord/Mongoid-esque object model for the Redis key/value data store.
May 15th, 2012 We look at easier schema-less hstore on Postgres, Ruby versions in your Gemfile, and Skype in your app. We learn how to DRY better, build a Gem from scratch, build a book without scratching yourself and how to binge on Code School for free. May 11th, 2012 Bootstrapping ...
gem_sample_ryopeko 0.0.1 gem sample ryopeko install gem install gem_sample_ryopeko Download Documentation Subscribe Stats Authors Ryoichi SEKIGUCHI 5 total downloads 5 for this version Owners Gemfile gem "gem_sample_ryopeko", "~> 0.0.1" Versions 0.0.1 May 19, 2012
faye.ru require 'faye' require File.expand_path('../config/initializers/faye_token.rb', __FILE__) class ServerAuth def incoming(message, callback) if message['channel'] !~ %r{^/meta/} if message['ext']['auth_token'] != FAYE_TOKEN message['error'] = 'Invalid authentication token' end e...
Продолжая тему слайдов, хочу поделиться ссылкой на стопку слайдов к выступлению Зака Холмана (Zach Holman) - "Stories From a Music-Fueled Distributed Streaming Bender" . Вы узнаете о проекте Play - музыкальном сервере в офисе GitHub. Просто красивые слайды, это еще не конец истории :)...
Mercury allows you to edit a section of HTML directly in the web browser through a WISYIWYG editor. Here I show how to integrate Mercury into a Rails app and save the changes back to the database.
Rails Authorization with Authority 2.0 Posted by sleeplessgeek on May 18, 2012 — 0 comments Authority is the Rails authorization gem that's as simple and flexible as Ruby inheritence. We recently released the 2.0 version, and it's rock-solid: tons of passing multi-platform tests and l...
Oct 31, 2011 | 8 minutes | Ajax , Plugins PJAX allows you to quickly update a section of a page using AJAX with automatic pushState support. Here I show how to use both pjax_rails and rack-pjax gems. Click to Play Video ▶ Tweet Download: source code Project Files in Zip (88.9 KB) mp4 ...
#102 Auto-Complete Association (revised) Nov 10, 2011 | 9 minutes | Forms , Ajax A select menu is often used for setting a belongs_to association, but you should also consider using a text field with autocomple. Here I use jQuery UI and show two different solutions: client side and se...
<% form_tag edit_individual_products_path do %> <table> <tr> <th></th> <th>Name</th> <th>Category</th> <th>Price</th> </tr> <% for product in @products %> <tr> <td><%= check_box_tag "product_ids[]", product.id %></td> <td><%=h product.name %></td> <td><%=h product.category.name %></td...
«Agile Web Development with Rails» содержит все необходимое для того, чтобы сразу начать разрабатывать веб-приложения на Ruby on Rails. Книга «Rails Recipes» содержит множество примеров и идей для вашего приложения. Как сделать аутентификацию пользователей? Как добавить AJAX-эффекты? ...
It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily.
#341 Asset Pipeline in Production Apr 11, 2012 | 13 minutes | Production , Deployment , Tools The Asset Pipeline is very useful, but it can be a pain in production. Here I show why it works the way it does, and how to customize it to fit your deployment setup. Subscribe to Watch Episo...
static VALUE add_namespace_definition(VALUE self, VALUE prefix, VALUE href) { xmlNodePtr node, namespacee; xmlNsPtr ns; Data_Get_Struct(self, xmlNode, node); namespacee = node ; ns = xmlSearchNs( node->doc, node, (const xmlChar *)(NIL_P(prefix) ? NULL : StringValuePtr(prefix)) ); if(!...
It was said in "Redmine on CentOS installation HOWTO" Uncomment the following line at top of the file /var/www/redmine/config/environment.rb: ENV['RAILS_ENV'] ||= 'production' There is these code in Redmine 1.4 but not in Redmine 2.0 I add this line into environment.rb, but it's not u...