Monthly Archives: December 2012

to_label function use

class Objective < ActiveRecord::Base …. belongs_to :interest_area …. end in objectives/form <%= f.association :interest_area %> 1) add to_label function to class InterestArea class InterestArea < ActiveRecord::Base attr_accessible :interest has_one : objective def to_label “#{interest}” end end Simple Form by default … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , | 1 Comment

Ruby operators helpful link

  http://www.tutorialspoint.com/ruby/ruby_operators.htm     http://www.klairvoyant.in

Posted in rails, ROR, ruby on rails, web development | Tagged , , , | Leave a comment

Run the generator again with the –webrat flag if you want to use webrat matchers – how?

suppose you want a file views/resumes/index.html.erb_spec.rb want to have webrat matchers 1) delete the file “index.html.erb_spec.rb” 2) use the generator respec:view resumes index –webrat or  respec:view resumes index show    –webrat     etc  if required more files or generator … Continue reading

Posted in rails, ROR, ruby on rails, web development | Tagged , , , , , | Leave a comment