search for: account_typ

Displaying 12 results from an estimated 12 matches for "account_typ".

Did you mean: account_type
2006 Apr 21
1
Data access problem in object when using acts_as_authenticated
Hi all, I''m running into this frustrating issue with the acts_as_authenticated plugin and one of the additional fields I added to the users table. I have added a column ''account_type'' to the users table (among several others) which denotes the type of account it is. This stores an integer value that is set by the system during account creation. The value is getting set correctly and I can see that it is in fact correct when I query on it directly in the database. So,...
2006 May 31
3
validate unless, LoginGenerator difficulty
...ser can add unless the user is an admin? My current code is: validates_uniqueness_of :user_id, :scope => ''event_id'', :message => ''You have already uploaded an item for this event.'' And I need to add something that overrides that requirement if user.account_type == ''admin''. I''m also running into a problem where I need my admin users to be able to edit other user''s information (and items) without becoming the new "owner" of that item/user. I think this is a conceptual problem on my part, but if someone cou...
2006 Aug 04
1
Need a better undersanding of form helpers
perhaps someone can take a little time to give me a better understanding of how to use form helpers. Here is what I''m working with in my app: user model - (the table where a user registers their information) it contains the following fields - first_name last_name email account_type (currently set to string but will probably be a select box with options) password_salt (I''m assuming these would be hidden) password_hash ( " ) controller main / welcome def welcome end For now all welcome does is pull up the main/welc...
2007 Oct 13
13
Story Runner: Readability of output with multiple params
Fistly, many, many thanks for RSpec and Story Runner. Minor request to improve readability of output Given a scenario item with multiple params.. Eg. And "the user belongs to", "Joe", "Acme" do |user_name, company_name| The readability of the following output is less than ideal.. "And the user belongs to company,Joe Public, No Videos" It would be
2006 May 19
0
No luck with multiple before_filters
...unless session[:user] and authorize?(session[:user]) session[:intended_action] = request.request_uri redirect_to :controller => ''user'', :action => ''signin'' return false end end def check_max_hands u = current_user if !u.account_type.unlimited? && u.hands_played_this_month >= u.account_type.hands redirect_to :controller => "user", :action => "upgrade" end end current_user just does User.find params[:user] With my code like that, I get "Couldn''t find User without...
2007 Jan 26
0
Problems with assert_select in integration tests
...Create Account", "/account/new_account_step_one" click_button "Next Step", "/account/new_account_step_one", :user=>{:username=>"TestUser", :password=>''T3st!ng'', :password_confirmation=>''T3st!ng'', :account_type=>''Personal'', :email=>''me-hcDgGtZH8xPR7s880joybQ@public.gmane.org''} click_button "Create Account", "/account/new_account_step_two", {:first_name=>''Test'', :last_name=>''User''} end private...
2008 Jul 16
2
belongs_to causing endless loop on first call to save!
...base add_session_data_to_account(PrimaryAccount.new) account.save! @id = account.id return account end private def add_session_data_to_account(account) #adds the impl-specific things to the account if(!@credit_card.blank?) card = CreditCard.new do |cc| cc.account_type = @credit_card[:type] cc.account_name = @credit_card[:name] cc.account_number = @credit_card[:number] cc.cvv = @credit_card[:cvv] cc.account_expiration = @credit_card[:expiration] cc.address = @credit_card[:address] cc.city = @credit_card[:city]...
2006 May 31
2
observe_field gets "Form is not defined"
...<label>Account Type:</label> <%= select :user, ''tmp_type'', [''choice_one'',''choice_two''], { :prompt=>"select account type" } %> </p> <%= observe_field :user_tmp_type, :update => ''account_type_options'', :url => { :action => ''account_type_details'' }, :with => "''account_type=''+value" %> <div id="account_type_options"> <!-- results go here --> </div> [/code] any suggestions on why i'...
2006 Apr 26
0
active record adding odd chars to insert statement
I''ve got some code that creates a Company object and saves it: c = Company.new( :name => params[''company''], :account_valid_until => mysql_date_format(14.days.from_now), :account_type => ''standard'' ) c.save but in the SQL generated by AR, I see (with ''name'' being what was entered): ''--- \n- name\n'' Any idea where this is coming from?? If I view the value before it''s saved, the chars aren''t in th...
2011 Jun 01
9
Routes and Namespace
Could someone explain me how to work with routes and namespaces? I need to understand it urgent to build an application. Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/aFVOeUZzVUlsUUFK. To post to this group, send email to
2008 Jul 08
12
Some more win32-security: SID.create
Hi all, How does this look as a general approach to a SID.create method: # Creates and initializes def self.create(authority, *sub_authorities) if sub_authorities.length > 8 raise ArgumentError, ''maximum of 8 subauthorities allowed'' end authorities = Array.new(8, 0) authorities.replace(sub_authorities) count = authorities.select{ |e| e > 0 }.size
2007 Oct 14
40
Step matchers
I think we all know that the readability of steps isn''t great right now, and in fact there''s a very recent thread that discusses just that. It was that recent thread that prompted me to explore this a bit. The basic idea is that you define step matchers, which have a regex, and then you match step names against that regex. Kind of tough for me to explain so I''ll just