Displaying 2 results from an estimated 2 matches for "sample_forms".
2008 Oct 26
3
Undefined method f_title
...leForms < ActiveRecord::Migration
def self.add_data
SampleForm.create(:name => ''Default (Empty)'', :f_type => ''Default
(Empty)'', :description => ''Use this template to create a blank form.'')
end
def self.up
create_table :sample_forms do |t|
t.string :name, :null => false
t.string :f_title
t.text :description
t.timestamps
end
self.add_data
end
def self.down
drop_table :sample_forms
end
end
While migrating, it gives the error ''undefined method f_title=''. I first
t...
2009 Mar 26
0
assert2-0.4.6 provides assert_xhtml, an alternative to assert_select
Rubyists:
Consider the following monstrosity, coded using assert_select:
assert_select "div#logo_box img[src=/0000/0001/logo.gif][alt=My Company]"
Now, behold it rewritten to use assert_xhtml:
assert_xhtml do
div.logo_box! do
img :src => /logo.gif$/, :alt => ''My Company''
end
end
That sample contains more Ruby; it''s not just