Class: Comment

Inherits:
Flareshow::Resource show all
Defined in:
lib/comment.rb

Instance Method Summary collapse

Methods inherited from Flareshow::Resource

#cache, cache_response, #changes, create, #destroy, #destroyed?, find, #get, get_from_cache, #id, #initialize, list_cache, #method_missing, #method_name, #refresh, #resource_key, resource_key, #save, #set, store, #update

Constructor Details

This class inherits a constructor from Flareshow::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Flareshow::Resource

Instance Method Details

permalink to this comment



4
5
6
7
8
9
10
# File 'lib/comment.rb', line 4

def permalink(mobile=false)
  if mobile
    "http://#{Flareshow::Service.server.host}/#{Flareshow::Service.server.domain}/shareflow/mobile/post/#{reply_to}"
  else
    "http://#{Flareshow::Service.server.host}/#{Flareshow::Service.server.domain}/shareflow/p/#{reply_to}?comment_id#{id}"
  end
end