Hi, I'm following tutorial 23, and I'm stucked. When I run ruby script/server I got the follow error:
=> Rails 2.3.8 application starting on http://0.0.0.0:3000 C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/ active_support/depende ncies.rb:380:in `load_without_new_constant_marking': C:/tutorialHobo/ four_table/ app/models/recipe.rb:19: syntax error, unexpected tIDENTIFIER, expecting '}' (Sy ntaxError) lifecycle :state_field => :lifecycle_state do ^ C:/tutorialHobo/four_table/app/models/recipe.rb:44: syntax error, unexpected kEN D, expecting '}' from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/ active_su pport/dependencies.rb:380:in `load_file' from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/ active_su class Recipe < ActiveRecord::Base hobo_model # Don't put anything above this fields do title :string body :text #country :string timestamps end belongs_to :country has_many :categories, :through => :category_assignments, :accessible =>true has_many :category_assignments, :dependent => :destroy named_scope :viewable, lambda {|acting_user| {:conditions => “#{acting_user.signed_up??1:0}=1 or lifecycle_state='published'" }} lifecycle :state_field => :lifecycle_state do state :not_published, :default => :true state :published transition :publish, { :not_published => :published }, :available_to => "acting_user if acting_user.signed_up?" transition :not_publish, { :published => :not_published }, :available_to => "acting_user if acting_user.signed_up?" end # --- Permissions --- # def create_permitted? acting_user.signed_up? end def update_permitted? acting_user.signed_up? end def destroy_permitted? acting_user.signed_up? end def view_permitted?(field) true end end Thanks! -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
