updated to rails 4 in gemfile and config
removed attr accessible
updated rest of code to be compatible for rails 4