Top "Activesupport-concern" questions

Rails: TypeError: wrong argument type Class (expected Module)

Inside app/models/abc/xyz.rb module Abc::Xyz extend ActiveSupport::Concern end Inside app/models/abc.rb class Abc &…

ruby-on-rails activesupport-concern
How to test a Controller Concern in Rails 4

What is the best way to handle testing of concerns when used in Rails 4 controllers? Say I have a trivial …

ruby-on-rails rspec controller activesupport-concern
Rails ActiveSuppport:Concern and Private Methods

This is a great idea about concern in rails: http://37signals.com/svn/posts/3372-put-chubby-models-on-a-diet-with-concerns And it's also a good …

ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4 activesupport-concern
what is difference between using concerns vs modules in rails?

Just now I started to using Concerns in rails, but i have doubt why we go for concerns, because we …

ruby-on-rails activesupport-concern
Rails 4 concerns: Give class instance variables to model

With Rails concerns I can give my model class methods and instance methods through modules by including them. No blog …

ruby-on-rails ruby ruby-on-rails-4 activesupport-concern
Accessing ActiveSupport::Concern class methods from within instance methods

I'm working my way through Michael Hartl's tutorial, but was finding the User class getting a bit cluttered. I wanted …

ruby-on-rails ruby activesupport activesupport-concern
Rails concern method override another concern method doesn't work like normal modules

Let's say I have the following structure in ruby (no rails) module Parent def f puts "in parent" end end …

ruby-on-rails ruby activesupport-concern
How to create a Rails 4 Concern that takes an argument

I have an ActiveRecord class called User. I'm trying to create a concern called Restrictable which takes in some arguments …

ruby-on-rails ruby ruby-on-rails-4 activesupport-concern