make aspect list visible option on new_aspect pane

This commit is contained in:
zhitomirskiyi 2011-01-27 13:40:58 -08:00
parent dcf6469ded
commit 3ebda174fb
2 changed files with 10 additions and 3 deletions

View file

@ -37,6 +37,10 @@ class AspectsController < ApplicationController
end
def create
@aspect = current_user.aspects.create(params[:aspect])
#hack, we don't know why mass assignment is not working
@aspect.contacts_visible = params[:aspect][:contacts_visible]
@aspect.save
if @aspect.valid?
flash[:notice] = I18n.t('aspects.create.success', :name => @aspect.name)
if current_user.getting_started

View file

@ -12,9 +12,12 @@
%p
= aspect.label :name , t('.name')
= aspect.text_field :name, :maxlength => 20
= t('aspects.contacts_visible')
= aspect.check_box :contacts_visible, :default => true
%p.checkbox_select
= aspect.label :contacts_visible, t('aspects.edit.make_aspect_list_visible')
= aspect.check_box :contacts_visible, :default => true
%br
= t('aspects.contacts_not_visible')
= aspect.submit t('.create'), :class => 'button'