It seems like the two controllers could be combined. Validating the
card and choosing a subscription type would be part of the same order,
so you could add the subscription types to the credit card controller
as an instance variable.



On Jun 8, 5:05 am, Vikas Gholap <[email protected]>
wrote:
> Hello all,
>
> I have following problem,
>
> I have a view called "new_sub_type.html.haml" and controller
> "SubscriptionTypes". In this view i'm showing a dropdown list of
> subscription types.
>
> When user submit form, I show another view "new_credit_card.html.haml"
> which is in controller "CreditCards". This form is submitted to
> "SubscriptionTypes" controller.
>
> Then i validate credit card information in "SubscriptionTypes"
> controller.
>
> if credit card info is not valid then i redirect to again credit cards
> "new.html".
>
> When user select value "subscription type" from first form, I want to
> use that "subscription type" value in "SubscriptionTypes" controller.
>
> I don't know how to get that value? i used "session".then I get value of
> "subscription type", but if credit card info is not valid I get nil
> value when redirected to "new_credit_card.html.haml"?
>
> Is there another way?
>
> Thanks,
> Vikas.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to