Skip to content

Commit

Permalink
Update i18n_rails_helpers and drop action views for admin tenant.
Browse files Browse the repository at this point in the history
  • Loading branch information
huerlisi committed Mar 24, 2014
1 parent 25a2456 commit 7ac8253
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -209,7 +209,7 @@ GEM
http_parser.rb (0.5.3)
httpauth (0.2.0)
i18n (0.6.9)
i18n_rails_helpers (1.0.9)
i18n_rails_helpers (1.2.0)
inherited_resources (1.4.0)
has_scope (~> 0.5.0)
responders (~> 0.9)
Expand Down
11 changes: 11 additions & 0 deletions app/controllers/admin/tenants_controller.rb
Expand Up @@ -9,6 +9,11 @@ def current_ability
@current_ability ||= Ability.new(current_admin_user)
end

# Redirect to the called path before the login
def after_sign_in_path_for(resource)
(session[:"user.return_to"].nil?) ? "/" : session[:"user.return_to"].to_s
end

# Actions
# =======
def new
Expand Down Expand Up @@ -41,4 +46,10 @@ def create
render 'new'
end
end

# Resource setup
protected
def collection
instance_eval("@#{controller_name.pluralize} ||= end_of_association_chain.accessible_by(current_ability, :list).paginate(:page => params[:page], :per_page => params[:per_page])")
end
end
5 changes: 0 additions & 5 deletions app/views/admin/tenants/index.html.haml

This file was deleted.

6 changes: 0 additions & 6 deletions app/views/admin/tenants/new.html.haml

This file was deleted.

7 changes: 0 additions & 7 deletions app/views/admin/tenants/show.html.haml

This file was deleted.

0 comments on commit 7ac8253

Please sign in to comment.