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] Re: Why can't inline template be rescued?

2015-11-21 Thread kopf1988
, "inline template", > handler, :locals => {}).render("Test2",{}) > rescue Exception # You should replace Exception with a more specific > class or classes if possible. > false > end > > On Sunday, October 18, 2015 at 4:17:24 PM UTC-5, kopf1

[Rails] Why can't inline template be rescued?

2015-10-18 Thread kopf1988
I am attempting to debug some complicated inline templates, because they are generated dynamically with the complicated way this program works. However when doing render inline: "Template here" rescue false, an error is still thrown if there's an error in the Template. I tried this in IRB and

[Rails] Rails Truncating TEXT values to 255 characters

2009-11-26 Thread kopf1988
Hello! Let me see if this is somehow easy. I have columns in my MySQL database set as 'text' ( double checked, they're not accidentally set to the wrong thing). I'm trying to Marshal some data for a special need in the program. Whenever I save this, though, the data (ie the resulting string after

[Rails] Using link_to and :host

2009-08-22 Thread kopf1988
Is it possible to use link_to and specify a :host WHILE using a polymorphic URL? I wanted to do this %= link_to item.name, item, :host = www.items.com, :only_path = false rescue % and ended up having to do this %= link_to item.name, url_for(:controller = 'item', :action = 'show', :id =

[Rails] A copy of ApplicationController has been removed from the module tree but is still active

2009-07-02 Thread kopf1988
Hi, I've been getting weird errors like the title ever since using rufus- scheduler, although I haven't conclusively proven it to be the problem. I also noticed, though, that rufus schedule gave errors like undefined method 'parsetweet' for #Twitteraccount:0xbddfdf (snip) in method_missing

[Rails] Re: A copy of ApplicationController has been removed from the module tree but is still active

2009-07-02 Thread kopf1988
something on a Twitteraccount. Strange thing is... it works, sometimes, sometimes it doesn't. On Jul 2, 7:57 pm, kopf1988 kopf1...@gmail.com wrote: Hi, I've been getting weird errors like the title ever since using rufus- scheduler, although I haven't conclusively proven it to be the problem

[Rails] Custom Helper Using Block

2009-05-14 Thread kopf1988
| % Employer: %= f.text_field :employer %br / % end % then I created the form like normal and called bloc.call(f), but it showed up in two places. Suggestions? Thanks for any help on either of these... I really want to make this form more ruby-esque. -Kopf1988

[Rails] Re: Spam check and rails, do you think is it possible?

2008-09-16 Thread kopf1988
This help? http://www.contactology.com/check_mqs.php On Sep 16, 11:39 am, Xdmx Xdmx [EMAIL PROTECTED] wrote: Hi, do you think is it possible to check the score a given text/email would have? For example, I've a newsletter, and before send all the emails i'd like to know (automatically) how