Module: Marley::Plugins::RestConvenience::ClassMethods

Defined in:
lib/marley/plugins/rest_convenience.rb

Instance Method Summary collapse

Instance Method Details



13
14
15
16
# File 'lib/marley/plugins/rest_convenience.rb', line 13

def reggae_link(action=nil, title=nil, args=nil)
  args="?#{args}" if args
  ReggaeLink.new({:url => "/#{self.resource_name}/#{action}#{args}",:title => (title||"#{action.to_s.humanize} #{self.resource_name.humanize}".strip)})
end

#resource_nameObject



10
# File 'lib/marley/plugins/rest_convenience.rb', line 10

def resource_name; self.name.sub(/.*::/,'').underscore; end

#urlObject



11
12
# File 'lib/marley/plugins/rest_convenience.rb', line 11

def url
end