Re: [Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-15 Thread pepe
I have never done this. Just trying to help. I think the problem you're having is that your field doesn't have a date compatible value. If you check it's class it might be NilClass. Since the fields does not belong to a table date_select probably has no idea what to do with it because it

[Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-14 Thread Loganathan Sellapa
Hi All, I am using active model for payment process in my application , i am not able to add field for date field, since it throws error as below *undefined method `card_expiration_date(3i)='*. *In model: * include ActiveModel::Validations include ActiveModel::Conversion extend

Re: [Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-14 Thread Colin Law
On 14 August 2012 07:50, Loganathan Sellapa loganathan...@gmail.com wrote: Hi All, I am using active model for payment process in my application , i am not able to add field for date field, since it throws error as below undefined method `card_expiration_date(3i)='. In model: include

Re: [Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-14 Thread Loganathan Sellapa
I thought it would create getter and setter methods for card_expiration_date and the active model library would do the rest(such as creating virtual attributes card_expiration_date(1i), card_expiration_date(2li),card_expiration_date(3li) for date time attribute( card_expiration_date), let me know

Re: [Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-14 Thread Colin Law
On 14 August 2012 08:44, Loganathan Sellapa loganathan...@gmail.com wrote: I thought it would create getter and setter methods for card_expiration_date and the active model library would do the rest(such as creating virtual attributes

Re: [Rails] How to define virtual attribute for date_select drop menu using active model

2012-08-14 Thread Loganathan Sellapa
My model* doesn't use Activerecord* ORM, I need to do validation on the table less model, so I am using the Activemodel library, also I hope the virtual field are needs to be mentioned as attr_accessor and I am sorry to mention that the model is table less in previous mail, since I thought people