Project
Ruby
Priority
Normal
Type
Feature
Fix versions
RubyMine after 4.0
State
Open
Assignee
Roman Chernyatchik
Subsystem
Inspections
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Roman Chernyatchik
    5 years ago (13 Feb 2007 20:29)
  • Updated by   Dmitry Jemerov
    21 months ago (29 Jul 2010 15:48)
  • Jira: RUBY-289
    (history, comments)
 
RUBY-289 Inspection: If template corresponds to some controller's method check that method is public (e.g. action method) and can be called without args
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Inspection: If template corresponds to some controller's method check that method is public (e.g. action method) and can be called without args
Comments (3)
 
History
 
Linked Issues (?)
 
Michael Klishin
  Michael Klishin
07 Sep 2007 21:44
4 years ago
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
# Check authentication stamp here...
end
end
Michael Klishin
  Michael Klishin
07 Sep 2007 21:45
4 years ago
Uh, I hope you got the idea from wrecked text sample above... I always thought JIRA is crap and counterintuitive :)
Roman Chernyatchik
  Roman Chernyatchik
11 Sep 2007 13:52
4 years ago
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