-1
votes
4answers
17 views

inserting into an array rails 3

I have a record and I want to inset it inside and array and later access it. users = User.all results = [] users.each do |user| results << {:name => user.name, :email => user.email} ...
0
votes
1answer
8 views

gem install ruby-odbc -v '0.99995' Not able install on ubuntu 11.10

I am not getting error while installing gem ruby-odbc -v'0.99995'. Please help me to solve this error. I try lot of things but it didn't worked. Building native extensions. This could take a ...
0
votes
0answers
12 views

Rails SimpleForm validations don't work with remote true

I have a SimpleForm setup with validations that is working well. I would now like to implement AJAX so I don't need to perform page reloads. When I add :remote => true to my code the validations no ...
2
votes
1answer
20 views

Rails: build for difference between relationships

A doc has many articles and can have many edits. I want to build an edit for each article up to the total number of @doc.articles. This code works with the first build (i.e., when no edits yet ...
0
votes
2answers
22 views

Add if statement to do-end block

I've rewritten my html code with rails content_tags and now I want to add if-statements to them. Before I had: <% if ... %> <div class='...'> ... </div> <% end %> ...
0
votes
1answer
20 views

NoMethodError: undefined method `create!' for Payment:Module

I have model Payment. When create a record in rails console, its showing "NoMethodError: undefined method `create!' for Payment:Module" at the same time, I am typing 'Payment' in rails console its ...
0
votes
1answer
16 views

Nested inputs disappears when form gets reloaded

in a rails app I have a create product page which includes a nested form for photos. There are validations to make sure there is always a photo present. But, when I try to submit the form without a ...
0
votes
2answers
15 views

Inheritance with Custom Validators Ruby on Rails

I was trying to create a custom validator class in Ruby on Rails that can be expanded. However, I cannot get it to use validation from both the sub-class and super-class. This example will clarify ...
0
votes
1answer
13 views

Ruby-on-Rails: ActiveAdmin SuperClass Mismatch TypeError

I'm just trying to install ActiveAdmin. Seems pretty straightforward. http://net.tutsplus.com/tutorials/ruby/create-beautiful-administration-interfaces-with-active-admin/ But when I get to rails ...
0
votes
0answers
19 views

Multiple namespaces routes and forms

I'm running a Rails 3 application. My directories are looking like that: -app -controllers -group -groups_controller -admin -groups_controller And my routes file: ...
0
votes
1answer
18 views

rails / bootstrap delete link issue: data-method delete not working

I am using gem 'twitter-bootstrap-rails' for rails bootstrap I have a few links on a page Rails code <td><%= link_to 'Destroy', swimming_classschedule, method: :delete, data: { confirm: ...
0
votes
2answers
20 views

Railstutorial 6.3.5 Can't mass-assign protected attributes: password, password_confirmation

Hartl's Rails book 6.3.5. Trying to insert someone into the db, this error pops up. I have done some research and I have this in the User model: attr_accessible :email, :name, :password, ...
0
votes
0answers
34 views

Devise will not send emails in any environment

I've been pouring over documentation, similar SO questions, IRC, and even hired someone on Elance in vein to get this fixed. The conclusion so far is that everything is correct, but it's not working ...
0
votes
2answers
28 views

How to test my update action with RSpec?

In my Rails application I have this update action: class UsersController < ApplicationController before_filter :authorized_user def update current_email = @user.email new_email = ...
2
votes
1answer
17 views

Issue creating comments on object when object retrieved with first_or_create

Apologies in advance, rails newbie. A landlord has N comments, a comment has 1 landlord Question : Why am I not creating a comment ? (returning a nil object) In landlords_controller#create: ...

1 2 3 4 5 1709
15 30 50 per page