Class: Manage::ResourceController
Instance Method Summary
collapse
#auth_user!, #current_user
Instance Method Details
#create ⇒ Object
26
27
28
29
30
|
# File 'app/controllers/manage/resource_controller.rb', line 26
def create
create!(:notice => "New #{resource_class} created!") do |format|
format.html { redirect_to action: :index }
end
end
|
#destroy ⇒ Object
38
39
40
41
42
|
# File 'app/controllers/manage/resource_controller.rb', line 38
def destroy
destroy!(:notice => "#{resource_class} deleted!") do |format|
format.html { redirect_to action: :index }
end
end
|
#end_of_association_chain ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'app/controllers/manage/resource_controller.rb', line 16
def end_of_association_chain
if self.resources_configuration[:self][:search_fields].blank?
self.class.search_fields :all
end
config = self.resources_configuration[:self]
@search = config[:search].new(filters: clean_search_params(params[:f]))
@search.results
end
|
#show_help ⇒ Object
44
45
|
# File 'app/controllers/manage/resource_controller.rb', line 44
def show_help
end
|
#update ⇒ Object
32
33
34
35
36
|
# File 'app/controllers/manage/resource_controller.rb', line 32
def update
update!(:notice => "#{resource_class} updated!") do |format|
format.html { redirect_to action: :index }
end
end
|