RailsCasts Pro episodes are now free!
Learn more or hide this
Resources
p = Project.find(2) p.update_attributes(:task_ids => [4]) p.tasks
attr_accessible :name, :photo
validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png'] # more security required
filter_parameter_logging :password
protect_from_forgery
def show @project = current_user.projects.find(params[:id]) end
def index @projects = current_user.projects.all(:conditions => ["name like ?", "%#{params[:search]}%"]) end
<%=h task.name %>