Skip to content

Instantly share code, notes, and snippets.

@almaron
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almaron/f08ad1e664e014a565d7 to your computer and use it in GitHub Desktop.
Save almaron/f08ad1e664e014a565d7 to your computer and use it in GitHub Desktop.
class GuestPost < ActiveRecord::Base
require 'rails_autolink'
validates_presence_of :head, :content, :user
def apply_answer(answer=nil)
if answer.present?
@answer = auto_link(answer)
end
end
private
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment