Method: ExtendPostsController#before_init
- Defined in:
- lib/generators/rdcms/templates/extend_posts_controller.rb
#before_init ⇒ Object
2 3 4 5 6 7 |
# File 'lib/generators/rdcms/templates/extend_posts_controller.rb', line 2 def before_init @post = Post.find(params[:id]) @post.visit! :by => request.try(:remote_ip) # respond_with @post end |