-
Notifications
You must be signed in to change notification settings - Fork 0
dilshod/actionresource
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ActionResource as Rails plugin ------------------------------ Install: copy rails folder to vendor/plugins as actionresource. run following commands: cp app/controllers/application.rb app/controllers/application_controller.rb echo '' > app/controllers/application.rb change config/routes.rb: ActionController::Routing::Routes.draw do |map| map.build_resources :html => true, :xml => true end Sample application: now create sample application: ./script/generate model user ./script/generate controller users change db/migrate/xxx_create_users.rb to: class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.string :name t.timestamps end end def self.down drop_table :users end end change app/model/user.rb to: class User < ActiveRecord::Base permalinked_with :id end change app/controllers/users_controller.rb to: class UsersController < ApplicationController resources :users end rake db:migrate ruby script/server and got to url http://localhost:3000/users ActionRespuoce as Merb plugin ------------------------------
About
RESTfull controllers for ruby on rails and merb (model preload, auto redirects, auto route map build, controllers hierarchy support)
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published