Class RemarksController
In: app/controllers/remarks_controller.rb
Parent: ApplicationController

Methods

Public Instance methods

REST-methods

[Source]

    # File app/controllers/remarks_controller.rb, line 29
29:   def create
30:     @remark = Remark.new(:logi => @logi, :user => current_user,
31:         :message => params[:remark][:message])
32: 
33:     if @logi.errors.empty? and @remark.valid? and 
34:         self.thorny_form_free_of_spam?
35:       @remark.save
36:       self.get_remarks
37:       @remark = Remark.new
38:       render :partial => 'logis/remarks'
39:     else
40:       self.get_remarks
41:       render :partial => 'logis/remarks'
42:     end
43:   end

Protected Instance methods

Private methods

[Source]

    # File app/controllers/remarks_controller.rb, line 49
49:   def get_remarks
50:     @remarks = @logi.remarks.find(:all, :limit => 10, :order => ["created_at DESC"])
51:   end

[Validate]