Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add an example

  • Loading branch information...
commit f2baadd1ce635c9767b78ab3196bf3ff5f0bec75 1 parent bf341bf
@clayallsopp authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 README.md
View
4 README.md
@@ -56,6 +56,10 @@ class Question < RemoteModule::RemoteModel
end
# An example of how we can use custom URLs to make custom nice(r) methods
+ # EX
+ # a_question.make_active(false) do |question|
+ # p question.is_active
+ # end
def make_active(active)
post(self.active_url, payload: {active: active}) do |response, json|
self.is_active = json[:question][:is_active]
Please sign in to comment.
Something went wrong with that request. Please try again.