new() public

Creates a new anonymous module. If a block is given, it is passed the module object, and the block is evaluated in the context of this module using module_eval.

   Fred = Module.new do
     def meth1
       "hello"
     end
     def meth2
       "bye"
     end
   end
   a = "my string"
   a.extend(Fred)   #=> "my string"
   a.meth1          #=> "hello"
   a.meth2          #=> "bye"
Show source
Register or log in to add new notes.
May 6, 2011
0 thanks

Using New

-rails new ProjectName -switch directories -git repo “git init”, then commit -add gems, bundle install -rails g scaffold TableName attribute:type attribute:type….. -authentication -add attribute_accessible/relationships/validations -get rid of index.html in public, set root “table#index” -rails g nifty:layout -rake db:migrate -git repo -rails s, see if works -change id’s to names in show and indexes -images go to public/images -partials are rendered in application.html.erb