search for: payment_typ

Displaying 6 results from an estimated 6 matches for "payment_typ".

Did you mean: payment_type
2006 Jul 12
5
DRY version of RoR book PAYMENT_TYPES example
In the book there is an example how to convert DB payment value to more readable from. PAYMENT_TYPES array is defined and then in your views you can use it as Order::PAYMENT_TYPES. The problem is: how should I convert DB values (for example with type char(1)) to full string representation. I know that I can add a Hash to a model: IM = {''S'' => ''Skype'', &...
2006 Jan 28
1
Collection_select problem
I have my customer object with title attribute : @customer.title Where title is "Mr","Mrs", etc.... In edit/create from i have: @titles=["Mr","Mrs","Miss"] how do i create a selection box that sets itself to the value of @customer.title?? This doesn''t work: <%=collection_select(:customer, :title, @titles)%> Any help would be
2006 Nov 07
1
reading VERY large binary files
...zip_code <- readChar(incon,5) tran$region_code <- readChar(incon,1) tran$county_code <- readChar(incon,1) tran$state_abbrev <- readChar(incon,2) tran$channel_code <- readChar(incon,1) tran$source_code <- readChar(incon,20) tran$payment_type <- readChar(incon,1) tran$credit_card <- readChar(incon,1) tran$promo_type <- readChar(incon,1) tran$flags <- readChar(incon,1) write.table(data.frame(tran), file="readHH_output", sep=",", row.names=FALSE, col.names=FALSE, append=...
2006 Aug 08
1
limit user input for legacy coding schemes
The legacy db I am currently working with has lots of codes (2 character strings) that are required to be the same in the new version of the app. Things like country codes, language codes and others which are not standard. Rather than create a table for each and then have a relationship between my models, I would much prefer to have a string field in the model being tagged with a code, limit
2009 Feb 26
1
composed_of, aggregate object isn't saved
...elds. I am not getting any errors - it is just that none of the address info is saved to the database. I even ran script/console and manually created and saved an order there - same result. Anyone have any ideas? Below is the Order class. Thanks. class Order < ActiveRecord::Base belongs_to :payment_type has_many :line_items, :dependent => :delete_all composed_of :shipping_address, :class_name => ''Address'', :mapping => [ %w(street, street), %w(street2, street2), %w(city, city), %w(state, state), %w(zip, zip) ] do |p| Address.new p...
2009 Mar 31
3
serving xml
Hi All, I''m trying to serve some XML from my Rails 2.0 server. I have a Flash file that always reads its configuration from /home/gallery.xml So, I would like to build the contents from the database and serve it back to the flash file when it hits my xml url. If it was HTML that it was asking for then in my home controller I have a gallery method that serves back a gallery.html.erb