Ruby on Rails version 3.2.0 released at January 20, 2012. Use this tag for issues related to development in Ruby on Rails version 3.2.0.
0
votes
1answer
17 views
Why does the Rails.cache.write return a different value in Rails 2.3.11 and Rails 3.2.11 console?
I am trying to expire key in 10 seconds, somehow it is, but not working with rspec. In this process, I noticed Rails.cache.write return false in Rails 2.3.11, while Rails.cache.write return true in ...
0
votes
1answer
36 views
Rails table-less model or a better way
I am using Rails 3.2.12.
I have a model A and table called a. I need to tag in a_details which is a set of attributes based on type of A. There is no table for a_details. Its made on the fly. In the ...
0
votes
2answers
20 views
Trying to pickup user who owns a record from controller
I have a Comments controller which is utilised in 2 other controllers (Task & Ticket).
I'm trying to have it email the owner of the Ticket once a comment has been created to notify them that the ...
0
votes
0answers
6 views
No matching rules found for update during a migration when using declarative authorization gem
I'm trying to run a migration (just adding a column and initializing it actually), but declarative authorization (gem) deny me access because she is using a "guest" user.
This is the error message i ...
0
votes
0answers
9 views
How to integrate promotional code for paypal express checkout
I am having a Rails 3 application working with Paypal Express Checkout. I need to add promotional code before the checkout, in order to provide some discount.
Is there any way to pass the promotional ...
0
votes
1answer
11 views
Rails: Display dropdown menu with categories and subcategories
I have a form where user selects sub-category of the product. I have a dropdown list to display all subcategories to choose from. This is the code in product form view:
<%= collection_select ...
0
votes
0answers
11 views
rails3 thinking-sphinx ERROR: unknown key name 'workers'
New 3.2 installation, calling bundle exec rake ts:rebuild, or bundle exec rake ts:index
action fails with error
ERROR: unknown key name 'workers' [...] development.sphinx.conf line 13 col 10.
the ...
1
vote
1answer
19 views
Is storing the data as json in mysql a good idea?
I got a scenario to have relational tables like a "section has many elements", so I thought of going for has_many relation model like a section has many elements.
I got some suggestions from our ...
0
votes
0answers
7 views
Nasty SSL certificate error occurs in Rails controller, but not in console
This error just keeps popping up at different times. It is absolutely maddening, and productivity-sapping.
This is rvm ruby-1.9.3-p392 and Rails 3.2.13, and Pow.
In the console, this command works:
...
0
votes
0answers
4 views
Why do rails_admin belongs_to fields fail after a certain number of records?
So, I've got a Show model and an Artist model. On the Rails Admin edit page for a Show, the Artist field shows up fine.
It works correctly until I reach a certain number of Artists. Somewhere ...
0
votes
1answer
21 views
Displaying data with has_many association in a table
I have three models like this
class Region < ActiveRecord::Base
attr_accessible :region_name
has_many :districts, dependent: :destroy
end
class District < ActiveRecord::Base
...
0
votes
0answers
8 views
Devise Override RegistrationController issue with resource.active_for_authentication?
I want to override this controller, in this moment the create method, I already made a little change on it
class RegistrationsController < Devise::RegistrationsController
def create
...
0
votes
1answer
16 views
Wrongly installed Nginx before Passenger for Ruby on Rails productions servers [closed]
Note: Although this question has to do with server installations, it has to do with development and production environments that confuse beginners like myself.
Being new to setting up servers, after ...
0
votes
0answers
24 views
Mongoid: filtering an embedded collection by sub-sub-documents multiple fields
I am a beginner in mogo and mongoid.
I it possible to filter sub-documents collection by a sub-sub-documents multiple fields ($elemMatch)? I'm trying to make a parametrized scope for an embedded ...
0
votes
1answer
11 views
Render a view's output later via a delayed_job
If I render html I get html to the browser which works great. However, how can I get a route's response (the html) when being called in a module or class.
I need to do this because I'm sending ...