mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
attr_accessible on Habit, & turn off whiny mass assignment for development
This commit is contained in:
@@ -6,8 +6,8 @@ class Habit < ActiveRecord::Base
|
||||
|
||||
belongs_to :user
|
||||
default_scope :order => 'position ASC'
|
||||
acts_as_list
|
||||
|
||||
attr_accessible :name, :habit_type, :score, :notes, :up, :down, :done, :position
|
||||
|
||||
# TODO set cron for this
|
||||
def self.clear_done
|
||||
Habit.where(:habit_type => Habit::DAILY).collect do |h|
|
||||
|
||||
@@ -23,7 +23,8 @@ HabitTracker::Application.configure do
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
# Raise exception on mass assignment protection for Active Record models
|
||||
config.active_record.mass_assignment_sanitizer = :strict
|
||||
# config.active_record.mass_assignment_sanitizer = :strict
|
||||
config.active_record.mass_assignment_sanitizer = :logger
|
||||
|
||||
# Log the query plan for queries taking more than this (works
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
|
||||
Reference in New Issue
Block a user