Ruby on Rails Monday, April 27, 2015

On 27 April 2015 at 12:23, Padmahas Bn <padmahas@gmail.com> wrote:
>> Why not? Presumably inside processrecovery.
>
>
> I didn't get you. Do you mean I can use Recovery.create(...) directly inside
> processrecovery without sending them to controller?

Of course, see section 5 of
http://guides.rubyonrails.org/active_record_basics.html

>
> If so how can I use params? Because I suspect Rails 4 won't let me to
> directly insert data to tables without using strong parameters by permitting
> them.

In Rails 4 the protection has been moved out of the model and into the
controller. You can do anything you like while manipulating models
directly rather than through controllers.

Colin

--
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@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtW0jNNjTy2hGxr%3DBg-jiZs7YKJ%3DR1OQq3Lm_F2LYaR2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment