From d28a71f5bf7e7d29f40d42bccbc55c8985f32eda Mon Sep 17 00:00:00 2001 From: rulingcom Date: Mon, 31 Jan 2011 11:31:33 +0800 Subject: [PATCH] remove .empty? which shouldn't be here --- app/models/user.rb | 2 +- app/views/admin/pages/_form.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 %>