Here are a few notes I have regarding merb=>rails3 w/ extlib=>AS and 1.8.7=>1.9.2:
Need the gems dm-rails and rspec-rails. To generate a new project that uses datamapper: rails new prj_name -m http://datamapper.org/templates/rails.rb Nothing special needed to use haml.. just add to Gemfile for bundler. Notable differencesControllers application_controller instead of application. No fancy sugar for params.. e.g., instead of def edit(id), you need def edit; id = params[:id] URL helpers Instead of link_to "req", url(:req,req_id), it is link_to "req", req_path(req_id) partials Instead of partial 'foo', it is render :partial => 'foo' escaped strings All strings are auto-escaped, e.g., = '<br/>' in Rails is equivalent to = h '<br/>' in Merb. Use raw() if you don't want it escaped. This is a pain in the ass for helpers that generate forms and other html snippets. old: DateTime.now - DateTime.time_to_day_fraction(0, 2, 0) new: DateTime.now.ago(120) (need to use activesupport: require 'active_support/core_ext/date_time/calculations') activesupport vs extlib: instead .snakecase, it is .underscore -- You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/merb?hl=en.
