Class: Admin::ScrapersController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Admin::ScrapersController
- Defined in:
- app/controllers/admin/scrapers_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 |
# File 'app/controllers/admin/scrapers_controller.rb', line 9 def create @scraper = Scraper.new(params[:scraper]) @scraper.layout = Layout.new({ :name => "#{@scraper.name} (scraped)" }) save_scraper @scraper end |
#new ⇒ Object
3 4 5 6 7 |
# File 'app/controllers/admin/scrapers_controller.rb', line 3 def new @scraper = Scraper.new @scraper.scraper_inserts << ScraperInsert.new response_for :new end |
#update ⇒ Object
16 17 18 19 20 21 |
# File 'app/controllers/admin/scrapers_controller.rb', line 16 def update @scraper = Scraper.find(params[:id]) @scraper.update_attributes(params[:scraper]) save_scraper @scraper, :edit end |