Return StatusFinder to its original state
This commit is contained in:
parent
a925509384
commit
82d476227c
@ -15,7 +15,7 @@ class StatusFinder
|
|||||||
case recognized_params[:controller]
|
case recognized_params[:controller]
|
||||||
when 'stream_entries'
|
when 'stream_entries'
|
||||||
StreamEntry.find(recognized_params[:id]).status
|
StreamEntry.find(recognized_params[:id]).status
|
||||||
when 'home'
|
when 'statuses'
|
||||||
Status.find(recognized_params[:id])
|
Status.find(recognized_params[:id])
|
||||||
else
|
else
|
||||||
raise ActiveRecord::RecordNotFound
|
raise ActiveRecord::RecordNotFound
|
||||||
@ -29,7 +29,7 @@ class StatusFinder
|
|||||||
end
|
end
|
||||||
|
|
||||||
def verify_action!
|
def verify_action!
|
||||||
unless recognized_params[:action] == 'show' || recognized_params[:action] == 'index'
|
unless recognized_params[:action] == 'show'
|
||||||
raise ActiveRecord::RecordNotFound
|
raise ActiveRecord::RecordNotFound
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user