Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-souza committed Jul 5, 2016
1 parent 05ca355 commit ef12258
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 134 deletions.
7 changes: 0 additions & 7 deletions app/controllers/sites/admin/roles_controller.rb
Expand Up @@ -21,13 +21,6 @@ def edit
@role = Role.find(params[:id])
end

def show
@role = Role.new
@roles = Role.order('id')
@rights = Right.order('id')
respond_with(:site_admin, @roles)
end

def new
@role = Role.new
respond_with(:site_admin, @role)
Expand Down
4 changes: 1 addition & 3 deletions app/models/site.rb
Expand Up @@ -15,8 +15,6 @@ class Site < ActiveRecord::Base
has_many :menu_items, through: :menus
has_many :pages, -> { includes(:i18ns) }, dependent: :destroy
has_many :pages_i18ns, through: :pages, source: :i18ns
#has_many :components, ->(site) { site.theme ? order(:place_holder, :position).where(theme: site.theme.name) : where(nil) }, through: :skins, dependent: :destroy
#has_many :root_components, ->(site) { site.theme ? order(:position).where("place_holder !~ '^\\d*$'").where(theme: site.theme.base) : where(nil) }, through: :skins, class_name: 'Component'
has_many :repositories, dependent: :destroy
has_many :extensions, dependent: :destroy
has_one :theme
Expand All @@ -29,7 +27,7 @@ class Site < ActiveRecord::Base
has_many :events, class_name: 'Calendar::Event', dependent: :destroy
has_many :skins, dependent: :destroy
#has_many :components, through: :skins
#has_many :styles, through: :skins
has_many :styles, through: :skins

has_and_belongs_to_many :locales
has_and_belongs_to_many :groupings
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Expand Up @@ -61,7 +61,7 @@
get :manage, :recycle_bin
end
end
resources :roles do
resources :roles, except: [:show] do
collection do
put :index
end
Expand Down

0 comments on commit ef12258

Please sign in to comment.