You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following model does a lot of things, it sets up relationships, sets up friendly id for clean urls (which I use in API's). But what it does not do is the before_save. Now it does this if I use the terminal or allow you to create a user through this model.
But this model is essentially a read only, you cannot write to it (Only Promiscuous uses it). Promiscuous, its seems, just goes ahead and inserts the data it should listen for based on the attributes.
It actually never does the whole Model.new, Model.save. Which is cool. But then rules like before_save fall apart.
Is there any way to say, before you insert this data, or even "after you insert" do x, once. In this case it should run the add_to_blog_owner_group method.
Maybe I am missing something?
The text was updated successfully, but these errors were encountered:
I am actually confused by this because, take the following example:
The following model does a lot of things, it sets up relationships, sets up friendly id for clean urls (which I use in API's). But what it does not do is the
before_save
. Now it does this if I use the terminal or allow you to create a user through this model.But this model is essentially a read only, you cannot write to it (Only Promiscuous uses it). Promiscuous, its seems, just goes ahead and inserts the data it should listen for based on the attributes.
It actually never does the whole
Model.new
,Model.save
. Which is cool. But then rules likebefore_save
fall apart.Is there any way to say, before you insert this data, or even "after you insert" do x, once. In this case it should run the
add_to_blog_owner_group
method.Maybe I am missing something?
The text was updated successfully, but these errors were encountered: