Questions tagged [inherited-resources]

Inherited Resources speeds up development by making your controllers inherit all restful actions so you just have to focus on what is important.

99 questions
0
votes
0 answers

How to get all records in inherited_resources collection?

How to list all records in a single page without pagination. Now I didn't use limit to fetch selected records, but it returns only 20 records in a page. How to remove limit from my query to retrieve all records? UPDATE def collection @users ||=…
Achaius
  • 5,904
  • 21
  • 65
  • 122
0
votes
1 answer

Undefined method when including mongoid embedded docs in inherited_resource collections

I have a couple mongoid models: class Album include Mongoid::Document field :name, type: String embedded_in :band end class Band include Mongoid::Document field :name, type: String embeds_many :albums end And I'm trying to get…
cayblood
  • 1,838
  • 1
  • 24
  • 44
0
votes
1 answer

Inherited Resources Rails 4 Update Action

My application is using Rails 4 with inherited_resources. Very oddly, the update action does not appear to work. When try to submit the form on the edit page, I get this error: ArgumentError in Admin::FaqsController#update wrong number of…
Jonah
  • 9,991
  • 5
  • 45
  • 79
0
votes
5 answers

Inherited Resources: How to send an email after a create or update action

I'd like to know what the best way is to send off an email when a record is created or updated specifically in the inherited_resources framework. Right now I'm doing this: def create create! UserMailer.create(object).deliver if…
Brendon Muir
  • 4,540
  • 2
  • 33
  • 55
0
votes
1 answer

Integrating inherited_resources and authority

I'm currently trying to integrate inherited_resources and authority into my Rails app. I'm a little bit stuck as to the best place to check the ability to do a controller action based on the resource. This code is given as an example in authority: …
Brendon Muir
  • 4,540
  • 2
  • 33
  • 55
0
votes
1 answer

Rails: Rabl template with inheritance model structure

I am working on a project which uses some inheritance structure ... The base class is .. # /app/models/shape.rb class Shape < ActiveRecord::Base acts_as_superclass # https://github.com/mhuggins/multiple_table_inheritance end A subclass is ... #…
JJD
  • 50,076
  • 60
  • 203
  • 339
0
votes
0 answers

can?(:update) returning false, but cancan not restricting edit / updates on resource with inherited_resources gem

I'm using cancan with inherited resources and I'm encountering a strange issue (possibly bug?) where I defined a permission for an edit permission for a user and suddenly they are authorized to access the /edit action despite the ability returning…
jdkealy
  • 4,807
  • 6
  • 34
  • 56
0
votes
2 answers

Retrieve created object from InheritedResources#create

In my Rails app, I have the following objects: Group: has_many users through group_membership GroupMembership: belongs_to user, belongs_to group User: has_many groups through group_membership Users can create groups. When this happens, I want to…
Logan Serman
  • 29,447
  • 27
  • 102
  • 141
0
votes
1 answer

How to detect gem usage in rails project?

I'd like to enable support for Inherited Resources gem in Opinio gem, but I need to detect if Inherited Resources is used in the project. I've looked at the docs for Bundler to find something about gem usage detection, but I've found nothing. Could…
1 2 3 4 5 6
7