Using html.erb as stand alone file

Lee Godden
Thu, 13 Mar 2014 13:33:58 -0000

Hi

Could anyone tell me if this is possible even with it being bad practice
and not using RoR as it was intended, I am looking into customizing my CRM
named 'HostPay' in order to integrate stripe payments. Hostpay
doesn't
support stripe, but It  is written in Ruby and containes a number of rhtml
files. I'm looking to create  a stand alone html.erb file which receives a
variable written as <%= (basket.to_f_withvat).to_money %>  from one of the
existing files.

On my stand alone page the variable mentioned will be assigned as such:


basket_total = (basket.to_f_withvat).to_money


charge = Stripe::Charge.create(
    :amount => basket_total, # This is your value as a variable.
    :currency => "usd",
    :card => token,
====etc =====
This will then proceed to take card payment with stripe

Of course my file will be nothing to do with the existing CRM structure of
views, models and Controllers, but as long as it renders in the browser and can
recieve the variable then it wont matter for this situation.
Again, I know this is bad practice but it's the only way i have at present
of doing this.

Hope someone can help me with this

Thanks

LEe

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/1c31a010-1e8a-46d2-a700-dea3820aa095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.