Re: [Rails] Turning URL varables into URLs

2018-01-24 Thread kopf1988
I don't know why you're still trying /cheapevents when you haven't defined it at all. Not best practices really, but try something like: get 'events/:cost', to: 'upcoming_events#index' and then in your controller, respond based on things like: if params[:cost] == "cheap" @events =

[Rails] Re: strong parameters

2018-01-24 Thread kopf1988
If you define a method such as post_params in the controller, it will only be accessible in the controller, and probably not in the gem. What gem is it, maybe this has been encountered before? On Wednesday, January 24, 2018 at 2:43:11 PM UTC-6, fugee ohu wrote: > > I'm trying to debug a gem

[Rails] Re: Access USB device from Ruby on Rails web app

2018-01-24 Thread kopf1988
Rails & Ruby aren't going to be what you need for this. You'll need some kind of library probably in C/C++/etc that runs on the host computer. The best way is to make that app respond to http web inquiries, and then it will run the appropriate native code and return the result as if it were a

[Rails] strong parameters

2018-01-24 Thread fugee ohu
I'm trying to debug a gem for the first time This gem has attr_accessible methods in it's models so I replaced them with strong parameters but I get unknown method for in this case post_params even though post params is defined in the posts controller -- You received this message because you

Re: [Rails] ordinary routes in main layout don't work when navigating to mounted engine path

2018-01-24 Thread fugee ohu
On Wednesday, January 24, 2018 at 9:06:00 AM UTC-5, Walter Lee Davis wrote: > > I have had some experience with this, and this page has a good bit of > detail around the `isolate_namespace` method: > http://guides.rubyonrails.org/engines.html > > Walter > > > On Jan 24, 2018, at 4:25 AM,

Re: [Rails] ordinary routes in main layout don't work when navigating to mounted engine path

2018-01-24 Thread Walter Lee Davis
I have had some experience with this, and this page has a good bit of detail around the `isolate_namespace` method: http://guides.rubyonrails.org/engines.html Walter > On Jan 24, 2018, at 4:25 AM, fugee ohu wrote: > > I installed a gem (blogit) so in my routes I mount it

[Rails] ordinary routes in main layout don't work when navigating to mounted engine path

2018-01-24 Thread fugee ohu
I installed a gem (blogit) so in my routes I mount it with mount Blogit::Engine => "/blog" but then all the regular routes in my main layout stop working with messages like undefined local variable or method `new_user_session_path' for #<#:0x007f96d1235a40> Thanks for reading and in advance