Calculator Solution?

20 views
Skip to first unread message

David Williams

unread,
Jan 10, 2017, 10:35:42 PM1/10/17
to Ruby on Rails: Talk
Does anyone have a calculator gem. I need one that easily embeds into the view.

Walter Lee Davis

unread,
Jan 10, 2017, 10:53:46 PM1/10/17
to rubyonra...@googlegroups.com
What do you need to calculate, and what will you do with the result?

Walter

> On Jan 10, 2017, at 10:35 PM, David Williams <techse...@gmail.com> wrote:
>
> Does anyone have a calculator gem. I need one that easily embeds into the view.
>
> --
> 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-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1c5ae939-3a14-4530-b021-b28956ecf76c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

David Williams

unread,
Jan 11, 2017, 11:56:23 AM1/11/17
to Ruby on Rails: Talk
I am going to allow the user to use it on the fly. They'll just calculate basic math.

Walter Lee Davis

unread,
Jan 11, 2017, 5:46:39 PM1/11/17
to rubyonra...@googlegroups.com
In that case, look at JavaScript calculators, this is nothing related to Rails, I'm afraid. Drop the JavaScript in the vendor/assets folder, make sure you link a <script> tag to it on the page where you want it to appear, and you should be done.

Here's one I wrote many years ago: http://scripty.walterdavisstudio.com/calculator/ You can't drop this into a jQuery project because it uses Prototype.js and the two don't get along. But it's fun and instructive to read the code.

Walter

David Williams

unread,
Jan 14, 2017, 6:30:53 PM1/14/17
to Ruby on Rails: Talk
Very nice. Thank you.
Reply all
Reply to author
Forward
0 new messages