Re: [Rails] Form fields not in schema/model

2017-04-20 Thread Colin Law
On 20 April 2017 at 15:12, nynhex wrote: > If they’re columns in a table backed by a model, you would simply validate > them on the model layer. That is the correct answer to the question asked, but I suspect that Fugee did not ask the question that he intended to ask. Colin

[Rails] no method for nill class

2017-04-20 Thread fugee ohu
In the snippet below,the last line causes the error; :showdate is whitelisted, it's components appear just in the params list returned by the browser The error's at the plus sign but not sure which of them @showday = params["showdate(3i)"] showmonth_string = params["showdate(2i)"]

Re: [Rails] What may cause request parameters to appear as nested parameters

2017-04-20 Thread Walter Lee Davis
utf8 and authenticity_token are at the "root" level of the params hash, at the same level as press_release. They are peers. Press release contains two child attributes and their values, because that's the way your form was set up. By default, when you use <%= form_for @foo do | f | %>

[Rails] What may cause request parameters to appear as nested parameters

2017-04-20 Thread fugee ohu
Here my params are nested utf8 wraps press_release which in turn wraps venue, venue_country, etc. What causes this behavior? {"utf8"=>"✓", "authenticity_token"=>"qR82bEuyDUS6XD1dxylozc96nGH0kxk/ew+sUe95LT9s+8G9PJqAr06khj0bE9SEPElcinsWxe0Kgzppzq1g0w==", "press_release"=> {"venue"=>"",

Re: [Rails] Re: [QUESTION] How to have different routes ids on different routes for the same resources?

2017-04-20 Thread André Orvalho
Thats great! I am glad you shared this. -- 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+unsubscr...@googlegroups.com. To post to this

[Rails] form fields not in schema

2017-04-20 Thread fugee ohu
I'm putting some fields in my form that the controllers gonna use but they're not columns in the table so I can't validate at the model level? How can I validate them? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from

[Rails] Form fields not in schema/model

2017-04-20 Thread fugee ohu
I'm putting some fields in my form that the controllers gonna use but they're columns in the table so I can't validate at the model level? How can I validate them? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from

[Rails] Re: [QUESTION] How to have different routes ids on different routes for the same resources?

2017-04-20 Thread Maurizio De Santis
I have to say that Rails is great. 5.1 introduces a wonderful feature for my need: direct http://edgeapi.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/CustomUrls.html#method-i-direct Now in config/routes.rb I can write: # Content model includes FriendlyId, so

[Rails] Re: [QUESTION] How to have different routes ids on different routes for the same resources?

2017-04-20 Thread André Orvalho
I don't think it is an hack what you are doing. To actually have routes receiving different types of ids you probably needed to change how those helpers are generated by rails. That means you might have to monkey patch rails. The alternative rails is giving you to be able to do this is by doing

[Rails] Looking for ROR projects to work on

2017-04-20 Thread sadathiru
Hello, I've a team of ROR developers who are ready to engage in delivering. We've experienced with different flavor of technologies other than ROR like python, java, perl, javascript, git, JSON, REST, SOAP, bash, RDBMS, linux commands and few others. We've also rich experience of working in

Re: [Rails] What may cause request parameters to appear as nested parameters

2017-04-20 Thread fugee ohu
On Thursday, April 20, 2017 at 8:05:00 AM UTC-4, Walter Lee Davis wrote: > > utf8 and authenticity_token are at the "root" level of the params hash, at > the same level as press_release. They are peers. Press release contains two > child attributes and their values, because that's the way your

Re: [Rails] Form fields not in schema/model

2017-04-20 Thread nynhex
If they’re columns in a table backed by a model, you would simply validate them on the model layer. > On Apr 20, 2017, at 9:06 AM, fugee ohu wrote: > > I'm putting some fields in my form that the controllers gonna use but they're > columns in the table so I can't validate

[Rails] Is there any drawback to eager load Rails app in test environment?

2017-04-20 Thread st0012
The reason I want to do this is because there are some bugs like "circular dependencies" can't be found without eager load the entire app. Since we only eager load at production, we can only notice this kind of issues on production. So I think it would be a good idea to eager load entire app