Class: Alchemy::Admin::LanguagesController

Inherits:
ResourcesController show all
Defined in:
app/controllers/alchemy/admin/languages_controller.rb

Instance Method Summary collapse

Methods inherited from ResourcesController

#create, #destroy, #edit, #resource_handler, #show, #update

Methods included from ResourcesHelper

#contains_relations?, #current_location_params, #edit_resource_path, #new_resource_path, #render_attribute, #render_resources, #resource_attribute_field_options, #resource_filter_select, #resource_has_filters, #resource_has_tags, #resource_instance_variable, #resource_model, #resource_name, #resource_path, #resource_relations_names, #resource_scope, #resource_url_proxy, #resource_window_size, #resources_header, #resources_instance_variable, #resources_path, #sortable_resource_header_column

Methods inherited from BaseController

#leave

Methods included from Modules

included, #module_definition_for, register_module

Methods included from Alchemy::AbilityHelper

#current_ability

Methods included from ConfigurationMethods

#configuration, #multi_language?, #multi_site?, #prefix_locale?

Instance Method Details

#indexObject



4
5
6
7
# File 'app/controllers/alchemy/admin/languages_controller.rb', line 4

def index
  @query = Language.on_current_site.ransack(params[:q])
  @languages = @query.result.page(params[:page] || 1).per(per_page_value_for_screen_size)
end

#newObject



9
10
11
12
# File 'app/controllers/alchemy/admin/languages_controller.rb', line 9

def new
  @language = Language.new
  @language.page_layout = configured_page_layout || @language.page_layout
end