app/admin/moderation.rb
# This code is evaluated within the controller class
This code is evaluated within the controller class
This code is evaluated within the controller class
def update
      id = params[:id]
      s = Moderation.find(id) if Moderation.exists?(id)
      s.update(story_params)
      if s.save!
        redirect_to admin_moderation_path(s)
      else
        render "edit"
      end
    end
def update id = params [ :id ] s = Moderation . find ( id ) if Moderation . exists? ( id ) s . update ( story_params ) if s . save! redirect_to admin_moderation_path ( s ) else render "edit" end end
This code is evaluated within the controller class
This code is evaluated within the controller class
#s.update_attributes(story_params)