Sha256: 53cd799ea7d710ee70a20e0ba60e3208a453f061bd7cdaf19e06d6bcb1a08cfc
Contents?: true
Size: 297 Bytes
Versions: 2
Compression:
Stored size: 297 Bytes
Contents
class TodosController::New < BaseAction def default_view_data super.merge({todo: todo}) end def perform return build_view(Home::ShowRedirect) unless current_user build_view(Todos::NewView) end private def todo @todo ||= Todo.new(user_id: current_user.id) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aldous-1.0.1 | examples/basic_todo/app/controller_actions/todos_controller/new.rb |
aldous-1.0.0 | examples/basic_todo/app/controller_actions/todos_controller/new.rb |