History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RUBY-289
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Roman Chernyatchik
Reporter: Roman Chernyatchik
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Ruby

Check that rails action must be public

Created: 13 Feb 07 19:29   Updated: 11 Sep 07 13:52
Component/s: Highlighting
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Check that rails action must be public

 All   Comments   Work Log   Change History      Sort Order:
Michael Klishin - 07 Sep 07 21:44
What do you mean? There are widely used protected methods in controllers. They are used for filters, for example.

class SampleController < ActionController::Base
before_filter :login_required

def index
end

protected

def login_required

  1. Check authentication stamp here...
    end
    end

Michael Klishin - 07 Sep 07 21:45
Uh, I hope you got the idea from wrecked text sample above... I always thought JIRA is crap and counterintuitive

Roman Chernyatchik - 11 Sep 07 13:52
Michael it means that action method (method with associated view template) should be public.
class SampleController < ActionController::Base
  before_filter :login_required

  protected

  def login_required
      #Check authentication stamp here...
  end

  def index
  end 
end

Here index isn't valid action method