Class: Backend::SearchSynonymsController
Instance Method Summary
collapse
#page_number, #paginate, #per_page
#breadcrumb, #current_admin, #default_app_locale, #translate_notice
#crypt
Instance Method Details
#create ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'app/controllers/backend/search_synonyms_controller.rb', line 15
def create
@search_synonym = SearchSynonym.new(allowed_params)
if @search_synonym.save
redirect_to backend_search_synonyms_path, notice: translate_notice(:added, :search_synonym)
else
render :new
end
end
|
#destroy ⇒ Object
25
26
27
28
|
# File 'app/controllers/backend/search_synonyms_controller.rb', line 25
def destroy
@search_synonym.destroy
redirect_to backend_search_synonyms_path, notice: translate_notice(:deleted, :search_synonym)
end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/backend/search_synonyms_controller.rb', line 7
def index
@search_synonyms = paginate(SearchSynonym.all)
end
|
#new ⇒ Object
11
12
13
|
# File 'app/controllers/backend/search_synonyms_controller.rb', line 11
def new
@search_synonym = SearchSynonym.new
end
|
#update ⇒ Object
30
31
32
33
34
35
36
|
# File 'app/controllers/backend/search_synonyms_controller.rb', line 30
def update
if @search_synonym.update_attributes allowed_params
redirect_to backend_search_synonyms_path, notice: translate_notice(:edited, :search_synonym)
else
render :edit
end
end
|