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