Class: Adhoq::QueriesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Adhoq::QueriesController
- Defined in:
- app/controllers/adhoq/queries_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
15 16 17 18 19 |
# File 'app/controllers/adhoq/queries_controller.rb', line 15 def create @query = Adhoq::Query.create!(query_attributes) redirect_to @query end |
#destroy ⇒ Object
32 33 34 35 |
# File 'app/controllers/adhoq/queries_controller.rb', line 32 def destroy Adhoq::Query.find(params[:id]).destroy! redirect_to action: :index end |
#edit ⇒ Object
21 22 23 |
# File 'app/controllers/adhoq/queries_controller.rb', line 21 def edit @query = Adhoq::Query.find(params[:id]) end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/adhoq/queries_controller.rb', line 3 def index @queries = Adhoq::Query.recent_first end |
#new ⇒ Object
11 12 13 |
# File 'app/controllers/adhoq/queries_controller.rb', line 11 def new @query = Adhoq::Query.new end |