Inherited Resources speeds up development by making your controllers inherit all restful actions so you just have to focus on what is important.
Questions tagged [inherited-resources]
99 questions
66
votes
4 answers
Rails: activeadmin overriding create action
I have an activeadmin resource which has a belongs_to :user relationship.
When I create a new Instance of the model in active admin, I want to associate the currently logged in user as the user who created the instance (pretty standard stuff I'd…

patrickdavey
- 1,966
- 2
- 18
- 25
8
votes
3 answers
Is there any ActiveResource like library for Java?
I know there are some ActiveResource Client libraries for Java, like RAPA and JactiveResource
The question is: is there any easy way to create the Server Side of ActiveResource in Java?
In RubyOnRails all you need to do is to use the Inherited…

Daniel Cukier
- 11,502
- 15
- 68
- 123
7
votes
1 answer
Rails 3.1.3 and Inherited Resources tests fail
I'm using Rails 3.1.3 for a project with Inherited Resources 1.3.0.
When I have a controller like so:
class PostsController < InheritedResources::Base
end
And I test with rspec the following
describe "PUT update" do
describe "with invalid…

map7
- 5,096
- 6
- 65
- 128
6
votes
1 answer
ActiveAdmin Rails 3.1 Install Issue
I am trying to use ActiveAdmin with rails 3.1, but I get the following error during rails generate active_admin:install I get the following:
gems/activeadmin-0.3.0/lib/active_admin/namespace.rb:176:in `eval': uninitialized constant…

ghempton
- 7,777
- 7
- 48
- 53
5
votes
2 answers
How to override inherited_resources with the rails scaffold command
I am using the active_admin gem in my Rails 3 application, which has as a dependency inherited_resources. I am somewhat of a newb and would rather avoid the black box qualities of inherited_resources for my own controllers, however, when I run the…

lightyrs
- 2,809
- 2
- 29
- 32
5
votes
4 answers
Inherited Resources and Mongoid
Has anyone had success having Rails 3, Mongoid and Inherited Resources working? Any tips for making it happen? I would love to use both gems.
Currently I am running into:
undefined method `scoped'
On index actions.
Thanks!
BTW a workaround for…

Jonathan
- 16,077
- 12
- 67
- 106
5
votes
1 answer
activeadmin singleton resource
i'd like to create settings page via activeadmin (edit/update).
https://github.com/huacnlee/rails-settings-cached.
But i faced that there is no way to register resource (not resources) in routes for particular page, eg have routes like…

Kirill Salykin
- 681
- 6
- 19
5
votes
2 answers
permitted_params - rails4 and inherited_resources
I've tried to use IR in rails4 app, but my code
class WorkspacesController < InheritedResources::Base
private
def permitted_params
params.permit(:workspace => [:name, :owner_id])
end
end
raises ActiveModel::ForbiddenAttributesError…

Alexey Poimtsev
- 2,845
- 3
- 35
- 63
4
votes
1 answer
How do I resolve this error while increasing eager loading? "ERROR ThreadError: Attempt to unlock a mutex which is locked by another thread"
My Rails application uses the inherited_resources gem. I am currently trying to speed it up to be able to handle a much larger data set. So I went forward (with the help of the Bullet gem) to use eager loading where it would prove helpful. Within…

Nick Schwaderer
- 1,030
- 1
- 8
- 21
4
votes
2 answers
ActiveAdmin and "uninitialized constant InheritedResources::Base"
I'm just trying ActiveAdmin. I've got the dashboard and some resources working, but now when I run for example a rails generator I got:
% rails generate scaffold Post…

ddidier
- 1,298
- 1
- 12
- 15
3
votes
2 answers
How do I make an inherited_resource optionally nested as a singleton?
I'm using inherited_resources to DRY my controllers, but can't figure out how to make a particular controller behave correctly. In my model, User has_one Person. I want it to be optionally nested, behave as a singleton when nested, and as a…

Ryan
- 231
- 1
- 14
3
votes
1 answer
Using a presenter with Inherited Resources
I use the excellent Inherited Resources gem quite a bit in my Rails apps, but whenever I want to use a presenter I fall back to writing controllers by hand.
Is there a good, clean solution for combining Inherited Resources with something like Draper…

Brian Rose
- 1,725
- 13
- 10
3
votes
2 answers
RSpec mock_model and inherited_resources
I'm trying to write spec for inherited_resources controller. I decided to mock all integration with the database using rspec's mock_model. Unfortunately I can't write spec for create and update action because I'm getting the following error:…

luacassus
- 6,540
- 2
- 40
- 58
3
votes
1 answer
Inherited Resources and CanCan 3 levels nesting
I have a problem with 3 levels nesting of models in CanCan combined with Inherited Resources. I've read that we should nest everything up to 2 levels, but I had to put everything under account model and now I've tried doing this in…

farnoy
- 7,356
- 2
- 20
- 30
3
votes
1 answer
rescue RecordNotFound in Activeadmin
How can I rescue ActiveRecord::RecordNotFound in Activeadmin for all my resources?
I know in Rails I can put rescue_from(ActiveRecord::RecordNotFound) in the ApplicationController, is there an equivalent way of doing this in ActiveAdmin?

kirlev
- 680
- 1
- 7
- 17