Followed along with Railscast 035 Custom REST Actions
Ruby CSS JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

035 Custom REST Actions

Followed along with Railscast 035 Custom REST Actions

Blog Post @ PatrickPerey.com

def completed
  @tasks = Task.where(completed: true)
end

def complete
  @task.update_attribute :completed, true
  flash[:notice] = 'Task Completed'
  redirect_to completed_tasks_path
end
resources :tasks do
  get 'completed', on: :collection
  put 'complete', on: :member
end