Ruby on Rails version 3.1.0 is a specific version of Ruby on Rails. It was released on August 30th, 2011. Use this tag for issues related to development in Ruby on Rails version 3.1.

learn more… | top users | synonyms

0
votes
1answer
19 views

Can we pass additional parameters along with render method in rails

Controller method: def add @project = Project.find(1) render xml: @project #wish to pass one more variable like this here end ajax call : endpoint = ROOT_PATH + '/projects/add/'+data_type; ...
1
vote
1answer
23 views

What's the best way to create an engine for an engine in Rails?

I am working with an engine in Rails and I'd like to extend its functionality with additional models and controllers in a modular format. My idea was to create an "engine for an engine." Is this the ...
0
votes
2answers
44 views

Why does it say I have the wrong number of arguments with RestClient Delete Method?

I have been using RestClient to call the API, so here I am calling the DELETE method to delete one image: @mposter_D = params[:mposter_D] @mid_D = params[:mid_D] req = Hash.new req['mov'] = @mid_D ...
0
votes
0answers
32 views

Routes helpers dont work on Rails 3.1

I'm upgrading a Rails 3 app to 3.1 and some reason the url helpers don't work in views. e.g.: If I try to get to reports_path it can't be resolved, and i'm getting the The error occurred while ...
1
vote
3answers
33 views

how to put comma in link_to

Ideally I want some like this LastName, FirstName, how to put comma into the link ? <%= link_to @name.first.LastName,@name.first.FirstName, management_show_path(:user_id => @name.first.id) ...
0
votes
2answers
23 views

PostgreSQL -must appear in the GROUP BY clause or be used in an aggregate function

I am getting this error in the pg production mode, but its working fine in sqlite3 development mode. ActiveRecord::StatementInvalid in ManagementController#index PG::Error: ERROR: column ...
0
votes
0answers
15 views

postgres error while using resque in local environment

I have using resque for running background jobs, but I am getting below error. I am running application in local, I am not able to run successfully. PG::Error: SSL SYSCALL error: EOF detected : ...
0
votes
1answer
34 views

Rails Send boolean to serializer

This is my comment controller def find post_id = params['id']; @comments = Comment.where('post_id = ?',job_id) respond_to do |format| format.html # index.html.erb ...
1
vote
1answer
39 views

Bundle Exec Rake DB Migrate Error

I have been getting this error when I run bundle exec rake db:migrate for a basic RoR website. I am a beginner and found similar errors on this site and Treehouse but nothing with the specific second ...
0
votes
0answers
4 views

ActionView::Template::Error (jquery.js isn't precompiled)

ActionView::Template::Error (jquery.js isn't precompiled): 9: <%= yield :head %> 10: <title>Mazzey</title> 11: <%= stylesheet_link_tag "application", ...
0
votes
1answer
14 views

Build Gem or Plugin or Engine in rails 3

I wanted to create my own Gem and so I Googled "how to build a rails 3 gem" and I got below results in top 2 guides.rubyonrails.org/plugins.html‎ & edgeguides.rubyonrails.org/engines.html‎ It ...
0
votes
0answers
11 views

Benefits of Rails namespaced isolated Engine?

I have 2 Rails applications mounting a Core Engine. The Engine is used here to group common code between Rails applications (they have very similar business logic but views and some other things ...
0
votes
0answers
34 views

Distance calculation using Geocoder

Is there any way to get distance as a virtual attribute in a rails query? currently i am using this : users = User.find_by_sql("select u.*,((6371 * 2 * asin(sqrt(pow(sin(((latitude - ...
0
votes
0answers
8 views

Mongoid: using association callbacks with forms correctly

I have come across a problem which I am struggling to solve elegantly. I am more versed in RDBMSs so the way I am doing things may not be ideal. What I am doing: I am having to keep track of items ...
-1
votes
0answers
23 views

Ruby gem for parsing xlsx that has good performance

I am looking for a good ruby gem that can parse xlsx file for import which has good performance and preferably line by line instead of loading the whole file into memory. Currently I am using ...

1 2 3 4 5 346
15 30 50 per page