features/app/app.rb in pickle-0.4.4 vs features/app/app.rb in pickle-0.4.5

- old
+ new

@@ -1,14 +1,14 @@ # Routes -ActionController::Routing::Routes.draw do |map| - map.resources :spoons, :controller => 'default' - map.resources :forks, :controller => 'default' do |fork| - fork.resources :tines, :controller => 'default' do |tine| - tine.resources :comments, :controller => 'default' +Rails.application.routes.draw do + resources :spoons, :controller => 'default' + resources :forks, :controller => 'default' do + resources :tines, :controller => 'default' do + resources :comments, :controller => 'default' end end - map.resources :users, :controller => 'default' + resources :users, :controller => 'default' end # Migrations ActiveRecord::Migration.suppress_messages do ActiveRecord::Schema.define(:version => 0) do @@ -96,27 +96,23 @@ end end # notifiers class Notifier < ActionMailer::Base - include ActionController::UrlWriter + include Rails.application.routes.url_helpers # BC 2.1 - if respond_to?(:view_paths) - view_paths << "#{File.dirname(__FILE__)}/views" - else - self.template_root = "#{File.dirname(__FILE__)}/views" - end + self.view_paths = "#{File.dirname(__FILE__)}/views" def user_email(user) @recipients = user.email @subject = 'A user email' - @body[:user] = user - @body[:path] = user_path(user) + @user = user + @path = user_path(user) end def email(to, subject, body) @recipients = to @subject = subject - @body[:body] = body + @body = body end end \ No newline at end of file