Stirling provides some architectures for Rails to develop quickly.
Add to your Gemfile.
gem "stirling"
BaseController automatically creates instance variable corresponding to controller name. For example:
UserController -> @user
and assigns parameter to instance variable.
Stirling provides command to re-create db like following.
$ rake db:recreate
In Stirling, accepting attributes is handeled to use acceptable_attributes
, class method in model. You have to do like following.
class User < ActiveRecord::Base
class << self
def acceptable_attributes
[:name, :age, :email]
end
end
end
acceptable_attributes
is inserted automatically in model if you generate to use rails g model MODEL_NAME
.
This project rocks and uses MIT-LICENSE.