Sometimes you need to run an objects private method from the console or something.
For example your model may look something like this:
@post.send(:set_initial_values)
# or with arguments
@post.send(:update_title, true)
Related External Links:

Sometimes you need to run an objects private method from the console or something.
For example your model may look something like this:
@post.send(:set_initial_values)
# or with arguments
@post.send(:update_title, true)
Related External Links:
Article Topic:Software Development - Ruby / Rails
Date:March 05, 2016
Want me to help develop your next Ruby-on-Rails project or application?
Contact Me