diff --git a/app/models/user.rb b/app/models/user.rb index ce64c7ac..b245769b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -6,7 +6,7 @@ class User mount_uploader :avatar, AvatarUploader - field :admin, :type => Boolean, :default => false + field :admin, :type => Boolean, :default => true field :active_attributes, :type => Array embeds_many :user_attributes diff --git a/app/views/admin/pages/_form.html.erb b/app/views/admin/pages/_form.html.erb index caf85e50..05503a73 100644 --- a/app/views/admin/pages/_form.html.erb +++ b/app/views/admin/pages/_form.html.erb @@ -2,7 +2,7 @@
<%= f.label :name, t('admin.name') %> -<% if @page.parent_id.nil? || @page.parent_id.empty? %> +<% if @page.parent_id.nil? %> <%= f.text_field :name, :class => 'text', :value => 'home', :disabled => true %> <%= f.hidden_field :name, :value => 'home' %> <% else %>