Based on https://gist.github.com/jchunky/3444833
class QuizAnswer < ActiveRecord::Base
...
def user_answer_collection
return [] if !user_answer
user_answer.split(",")
end
Based on https://gist.github.com/jchunky/3444833
class QuizAnswer < ActiveRecord::Base
...
def user_answer_collection
return [] if !user_answer
user_answer.split(",")
end
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
gem 'omniauth' | |
gem 'omniauth-facebook' | |
gem 'clearance' |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
require 'rubygems' | |
desc "Completely empty /build" | |
task :clobber do | |
sh "rm -rf build/* build/.[Dh]*" | |
end | |
desc "Export compiled build" | |
task :build do | |
sh "mm-build" |