class User
def before_save
puts 'before save'
end
def after_save
puts 'after_save'
end
def around_save
puts 'in around save'
yield
puts 'out around save'
end
end
User.save
before save
in around save
out around save
after_save
=> true
Have worked on following Ruby on Rails Frameworks and libraries:- Javascript: jQuery, Twitter Bootstrap, ZURB-foundation, Node.js, Backbone.js, Cross-browser javascript, HTML/CSS, Cross-browser html/css, HTML5/CSS3, Compass, SASS, Ajax CMS: RefineryCMS, AdminActive Payment Gateway : Authorize.net, Paypal, Stripe Database: MySQL, PostgreSQL Cloud: Amazon S3, Heroku, Git , SVN Testing Tools: TDD and BDD, Rspec, Cucumber, Selenium
Tuesday, February 24, 2015
The around_* callback is called around the action and inside the before_* and after_* actions. For example:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment