nil instead of raising a NoMethodError if the receiving object does not implement the method, but you can still get the old behavior by using the new Object#try!.
:comments end concern :image_attachable do resources :images, only: :index end # These concerns are used in Resources routing: resources :messages, concerns: [:commentable, :image_attachable] # or in a scope or namespace: namespace :posts do concerns :commentable end
artists musics:uniq # will create a migration with create_join_table :artists, :musics do |t| # t.index [:artist_id, :music_id] t.index [:music_id, :artist_id], unique: true end
< ActiveRecord::Base attr_accessible :title, :body end # after class Post < ActiveRecord::Base end class PostsController < ApplicationController def create @post = Post.create(post_params) end private def post_params params.permit(:title, :body) end end end
tools can talk with you # ~/.talksrc bundle: voice: 'vicki' before_message: 'Bundler again will do all right' after_message: "Bundler's job is done here" before_notify: 'This will go to notification before `before_message`' after_notify: 'This will go to notification after `after_message`' $ talking bundle install https://github.com/gazay/talks
environment # and run the bundle command to install it. gem "letter_opener", :group => :development # Then set the delivery method in # config/environments/development.rb config.action_mailer.delivery_method = :letter_opener # Now any email will pop up in your browser instead of being sent. # The messages are stored in tmp/letter_opener. https://github.com/ryanb/letter_opener
codebases on the fly. # It's a Rack application that acts as a HTTP proxy between you and your # web application for rapid testing. Divergence::Application.configure do |config| config.git_path = "/path/to/git_root" config.app_path = "/path/to/app_root" config.cache_path = "/path/to/cache_root" config.callbacks :on_branch_discover do |subdomain| case subdomain when "release-1" "test_branch" when "release-2" "other_branch" end end end https://github.com/layervault/divergence