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.

learn more… | top users | synonyms

0
votes
0answers
6 views

ArgumentError (A secret is required to generate an integrity hash for cookie session data

I am getting this error while running rails application and here is the complete Error ArgumentError (A secret is required to generate an integrity hash for cookie session data. Use ...
0
votes
1answer
16 views

How do I build a request scheduler using ruby on rails?

I am building an application that requires users to schedule appointment/conversations times with mentors. I am having a hard time building this out. I have been reading up on the has_many :through => ...
0
votes
2answers
25 views

Rails has_many and belongs_to different classes

Hello this is what I am trying to do. In my Design new.html.erb form I would like to show all the technologies that are available (which were created beforehand in the Technology Table with ...
0
votes
1answer
17 views

Passing an array of IDs to button_to in Rails?

Is there a way to pass an array of object IDs through button_to? I want the ID passed to controller in an array format so that it'll be the same format as if the user decides to select several items ...
0
votes
0answers
18 views

Rails complains about setting layout to default. What is it trying to get me to do? [duplicate]

I understand the literal text of this error message I'm getting from Rails 3.2.13, but I don't understand the motivation behind it or what is the best practice for cleaning this up. DEPRECATION ...
0
votes
1answer
11 views

How can I include the authenticity_token without using form_for?

I have many small pages that do not correspond to standard resource-based forms in my Rails 3.2.13 project. I am using Ajax calls from these forms to do POSTs. I'm getting the error: WARNING: Can't ...
0
votes
1answer
15 views

Namespaced controllers and classes in Modules

I have done this command: rails g controller father/child and it has genersted this for me: class Father::ChildController < ApplicationController end But my goal is to have this: module Father ...
0
votes
1answer
15 views

Run Generate Controller command from a Module

I know the basic command to create controllers in Rails is to use Rails generate controller But in the code I see something like this structure below and was wondering how to do that? The structure ...
0
votes
2answers
34 views

Call a controller method automatically when rendering a partial

I have a partial that needs to have some controller logic run before it can render without issue. Is there some way to associate the partial with some controller logic that is run whenever it is ...
0
votes
1answer
7 views

Can I use diaspora with a pre-existing rails app?

Yes, can I do such a thing? is there a tutorial for that? Also, Can I control the activity content? for example, can I add a HTML5 canvas? or customize the activity model?
0
votes
1answer
24 views

ruby / rails - hash max by :key does not return largest value

I have a query that looks for all events on a given date @s_date. Event start_datetime is within day OR - event end_datetime is within day @s_hash_items = @company.events.where('(start_datetime > ...
0
votes
1answer
10 views

Understandng a mixture of Rails and Bootstrap code

- if signed_in? = primary_nav( | title: { text: t('.home_page'), href: root_path }, ...
1
vote
0answers
21 views

failed to allocate memory on the console and internal server error on the browser

I have this error while loading the data from files in to database. Please help me out in getting this right. here is the method : clusters.each do |cluster| cluster_path = cluster.path ...
0
votes
1answer
5 views

Rails: slug containing underscores not getting generated

I an running a script on rails console to generate slug for profile brand names. This is my script: class String def to_slug #strip the string ret = self.strip.downcase #blow away apostrophes ...
0
votes
0answers
19 views

capybara + selenium + rspec + element not found

I m using capybara + selenium + rspec to test my application. I have a page, none of whose elements are manipulated by ajax or javascript(hide/show/toggle). When ever i try to submit the form on the ...
0
votes
0answers
7 views

Rails 3.2 using curb gem. error - uninitialized constant LoginController::Curl

I've installed curb gem 1) gem install curb 2) included in gemfile gem 'curb' 3) in boot.rb require 'rubygems' require 'curb' But i get an error when i try to use Curl http = ...
-3
votes
0answers
34 views

Ruby on Rails: conversion of array into required array [closed]

I am trying to solve the issue mentioned in Ruby on Rails: calculate number of days using records in array and insert in another array So, now i am having an array say array = ...
0
votes
0answers
4 views

Adding New Actions to Devise Registration

I m trying add new action to devise registration but it's not recognize newly add actions. devise_for :accounts, :controllers => { omniauth_callbacks: "omniauth_callbacks", registrations: ...
0
votes
1answer
28 views

how to move to your desired page after DEVISE AUTHENTICATION in Rails

I am using Devise in my rails app to authenticate. After signing in from sign in page it doesn't go to any other page. How do I configure Devise to move to my desired page after authenticating from ...
0
votes
0answers
66 views

Ruby on Rails: calculate number of days using records in array and insert in another array

I have an array which consist of some records fetched from the table. Example record: rec = ReworkCycle id: 6634, issue_id: 2651, status_id: 3, project_id: 14, created_on: "2013-05-29 07:41:06", ...
1
vote
1answer
52 views

Rails: Why “collection=” doesn't update records with existing id?

User can have many posts: class User < ActiveRecord::Base has_many :posts accepts_nested_attributes_for :posts end class Post < ActiveRecord::Base belongs_to :user end Why the ...
-3
votes
0answers
27 views

Fund transfer from one account to another [closed]

I just want to bulid a small application where just like internet banking application. For authentication i have used devise gem . Please suggest me that how to write a code for fund transfer. thanks ...
0
votes
0answers
6 views

rmagick - undefined symbol: omp_get_num_threads

I just clone existing project trying setup that project getting rmagick issue.. How resolve this issue "undefined symbol: omp_get_num_threads". I am using ubuntu 10.04 rake db:migrate rake aborted! ...
0
votes
2answers
29 views

ruby on rails: true button to boolean datatype in database?

I have a column in database with datatype boolean class Table < ActiveRecord::Migration def change create_table :services do |t| t.boolean :recommend, :default => false ...
0
votes
0answers
23 views

stopPropagation with Bootstrap dropdown and AngularJS causes input to not allow text entries

The scenario that I have is a Twitter Bootstrap dropdown with an input field. This is in an AngularJS app with a Rails 3.2 backend. Here is the markup for the dropdown: <div class="dropdown"> ...
0
votes
1answer
23 views

Good practice for multiple similar before_filters

I have set up a rails application with devise as the authentication system. I use polymorphic associations for different kinds of users. Now I want to add some before_filters to control access rights ...
1
vote
2answers
27 views

Events with multiple dates do I use has_and_belongs_to_many

Users can create multiple day events. So an event can have multiple dates, including a start time and end time for the date. So an event might have these dates: July 1 2013 9:00am - 5:00pm July 2 ...
0
votes
2answers
35 views

Rails “has_many” association: “collection=” doesn't work as expected

Invoice has many invoice entries: class Invoice < ActiveRecord::Base has_many :invoice_entries, :autosave => true, :dependent => :destroy validates_presence_of :date end class ...
0
votes
2answers
31 views

Why Don't my Parameters get Passed in Ruby on Rails?

So, I'm really new to Ruby on Rails and the whole thing still sounds like Chinese to me. Excuse me if this is a stupid question, but I'm trying to make a new button on my app that lets me copy things. ...
0
votes
1answer
25 views

respond_with and how to set redirect location?

I have the following that update user profile. It does perfectly fine with base url (http://domain_name.com/users/). def update @user = User.find(params[:id]) respond_with @user do |format| ...
0
votes
0answers
11 views

Declarative_authorization in RAILS 3.2.9 fails when running sever as daemon

If I run my application like: #authorization_rules works rails s -p 80 All declarative authorizations work fine. Just as they did during development. But if I run the server as a daemon (which ...
0
votes
0answers
18 views

RSpec + FactoryGirl validation

I have some problems with user validation and rspec testing. In my User model I have some validations. validates_presence_of ...
0
votes
1answer
11 views

Link to all CSS and JavaScript files in Rails

I have a Rails 3.2 project on Apache. In the views/layouts/application.html.erb file I have the lines <%= stylesheet_link_tag :all %> <%= yield :javascript_includes %> Instead of ...
0
votes
2answers
21 views

Rails 3.2 access public image

I'm on Rails 3.2, and my image im.png is located in app/assets/images. How can I access it on my website? I've tried app/assets/images/im.png and im.png, but neither works.
0
votes
0answers
29 views

uninitialized constant when initializing module

Lately have been seeing the following error: A NameError occurred in new_hire_onboarding#index: uninitialized constant BambooHR app/models/company.rb:97:in `bamboo_api' Line 97 of company.rb is ...
0
votes
1answer
16 views

Rails - Heroku Postgresql SQL Error - Works on Local SQLite - Error “ActiveRecord:Invalid Relation”

Hi here is my ActiveRelation query that works fine on local development environment (SQLite) @table2_items = @table1var.table2_items.find(:all, conditions: ["status1 is ? AND status2 is ? AND ...
0
votes
1answer
6 views

App's locale files affect Engine's locale files. It force to have the same files in the hosting app. How fix it?

I experience strange behavior in my app with engine. App's locale translation files affect engines's ones. To make engine's files work I have to explicitly create the same files in the app. Just to ...
0
votes
1answer
29 views

Two consecutive issues: carrierwave and polymorphic show nothing and Can't mass-assign protected attributes: attachment

I am trying to set up a polymorphic association for file uploads. Now pending on the code below, two issues take a very long time. I have searched a lot, but still can't find a resolution #post.rb ...
0
votes
0answers
12 views

Facebook sharing returns internal server error

I am using client side facebook sharing feature, were I used the javescript to share the content to facebook, it was worked previousy well but now I am getting the Internal server error from facebook, ...
0
votes
1answer
16 views

Join domain name and permalink in to_param

I have model looks like this : class Listdomain < ActiveRecord::Base attr_accessible :domainname, :permalink before_create :make_it_permalink validates_presence_of :domainname ...
0
votes
0answers
27 views

A better way of writing a scope with lambda to pull records then .count

I currently have these scopes to pull records of Tasks in specific date ranges on a Customer record. scope :by_current_month, lambda { where("created_at >= '{date.beginning_of_month.to_s(:db)}' ...
-1
votes
1answer
18 views

Economical hosting plan for rails application [closed]

I am looking for an economical hosting plan for rails application. I've checked heroku plan but it is too expensive (35$/month minimal). Free tier of heroku is not of my use since my database might ...
0
votes
0answers
21 views

correct way to add ckeditor templates and plugins in rails3 (asset pipeline)

I cannot figure out how to add additional plugins and Templates to a ckeditor config in rails 3 (asset pipeline). I tried to put all of them into two folders that i created: ...
0
votes
1answer
17 views

Number of params in query params

In the console output of the rails app I see something like this: INFO: Started GET "/pharmacy?chart=medications&brand_name=BrandName_449&dose=6&form=Form_3&filter=phy_group" ...
-1
votes
1answer
46 views

!! Unexpected error while processing request: failed to allocate memory

Please help me in solving this error. I am getting this error while loading records from text files in to database using ruby scripts. It just works fine if I use small number of records to load ...
0
votes
1answer
27 views

How i should set javascript global variable to get its value properly

I have two html elements on my page. One is dropdown and other is text field(which is working as autocomplete). <select id="match_engine_brand" name="match_engine[brand]" ...
0
votes
0answers
9 views

Confusion regarding act as taggable on gem

I ve few confusions with the act_as_a_taggable gem. They are as follows: I want to use tags as categories in my blogpost application as it is done in railscasts website. Ive created one context list ...
0
votes
0answers
20 views

how to cancel all workitems in ROUTE gem

I am using route gem in our project I want to cancel all the workitems which is created on timeout of 3 days I have written the code some what like this return %Q{ concurrence count: 1 , ...
0
votes
1answer
11 views

Heroku mysqldump to remote host

I created a nice little Rake task to backup our Mysql database on ClearDB to a remote Google storage bucket. Works great locally but running it on Heroku I get this error: sh: mysqldump: not found ...
0
votes
2answers
36 views

what do we call it if write the same method twice in ruby

I was just trying to explore oops concept in ruby inheritance using mixins overloading(not exactly) as var arg passing i just wanted to what do we call this in OOPS terms class Box def ...

1 2 3 4 5 90
15 30 50 per page