Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with "squeel" #25

Open
thebravoman opened this issue Jan 21, 2015 · 1 comment
Open

Incompatibility with "squeel" #25

thebravoman opened this issue Jan 21, 2015 · 1 comment

Comments

@thebravoman
Copy link

I am using "squeel"
I add hydra_attributes and the following code that is "squeel" specific no longer works.

User.order("created_at").where{created_at >= my{first_registration} }

I do not expect hydra to handle created_at since created_at is not a hydra attributes and it should leave this to the squeel.

@thebravoman
Copy link
Author

Same appliese for this examples:

Actually most of the code is broken after hydra introduction.

scope :monthly_digest, -> { confirmed.where{(digest == "monthly")} }
scope :weekly_digest, -> { confirmed.where{(digest == "weekly")} }

scope :confirmed, Proc.new{|date|  
    if date.present?
        where{((confirmed_at > date.beginning_of_day) & (confirmed_at < date.end_of_day))} 
    else
        where{confirmed_at != nil}
    end
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant