Sha256: 3ac5673c8c63a8879da2ba93459baa4d92311a17cfe7022958c1da705a44a60e
Contents?: true
Size: 581 Bytes
Versions: 9
Compression:
Stored size: 581 Bytes
Contents
class Admin::StatesController < Admin::BaseController resource_controller belongs_to :country before_filter :load_data index.response do |wants| wants.html wants.js do render :partial => 'state_list.html.erb' end end create.wants.html { redirect_to admin_country_states_url(@country) } update.wants.html { redirect_to admin_country_states_url(@country) } private def collection @collection ||= end_of_association_chain.order_by_name end def load_data @countries = Country.order_by_name end end
Version data entries
9 entries across 9 versions & 1 rubygems