0
votes
3answers
20 views

Big Integers and Custom Validation

I'm somewhat new to Rails and I'm trying to learn about custom validations. One common requirement in Brazil are CPF/CNPJ/RG fields. They are a type of identification number and follow a specific ...
0
votes
1answer
15 views

Possible to use ActiveRecord methods on objects loaded from db?

I would like to apply the "find_all_by..." method to records that have already been retrieved by User.all. Is this possible? At this point I am getting an "undefined method `find_all_by_type" error: ...
0
votes
1answer
22 views

Rails - how to join/group nested tables and get joined values out?

I have the following hierarchy of models where each one has_many of the one below it: class AccountGroup < ActiveRecord::Base has_many :accounts, :inverse_of=>:account_group # name: string ...
0
votes
0answers
8 views

Why am I getting a Psych error when trying to deploy with capistrano?

I am currently setting up capistrano in my Rails 3.2.13 app. I am getting the below error/details. I have done some searching for this but do not see anything related to me. I am using rvm-capistrano ...
0
votes
0answers
12 views

Rails returning Nil Id in model callbacks

Im looking to create a Proposal after I create a particular Project I create the project like so... projects_controller.rb ... def create @project = ...
0
votes
0answers
10 views

Delayed_job is no longer logging

For some reason, my Rails app is no longer logging my DelayedJob gem's activity, either to a separate log (delayed_job.log) or to the main Rails development log. I am also using the Workless gem, ...
0
votes
1answer
19 views

parse form hidden field in rails

In a form_for form I have a hidden tag <%= hidden_field_tag :receiver, :value => @post.user.email %> However when the form submits, the parameters look something like this: ...
2
votes
0answers
43 views

Everything is 2 days off rails 3.2.13

Okay this has got to be the oddest rails related issue ever. It was brought to my attention about a month ago when some of our Employees started to notice that everytime the enter a value in a date ...
0
votes
0answers
22 views

post a json message to rails server with special characters using java

I have a model Message that have subject:string and content:text. I can create new messages sending a Post message using HttpURLConnection with json. But if one attribute contains special characters ...
0
votes
1answer
31 views

Item color picker/swapper

Let's say I have two products: iPhone 5 64GB (White) and iPhone 5 64GB (Black). What's the best way to create a color picker/swapper if the names of the items include the color (which unfortunately ...
0
votes
2answers
22 views

Database schema for multiple choice Trivia game

I'm trying to determine the most efficient db schema for a multiple choice trivia game. I have the questions and answers in a spreadsheet with the columns, 'question_id', 'level', 'question', ...
0
votes
2answers
26 views

Rails not recognizing relationships

Having issues trying to set up the relationship in my database. I have a user and some comments (1:N) Class User .. ... has_many :comments end Class Comment .. .. belongs_to :user end ...
0
votes
1answer
24 views

How do I rename a file in Heroku

I have an app on Heroku. At some point in time I accidentally name the folder "Admin" instead of "admin". Now it is stuck with the capitalized name instead of the lowercase. how do i resolve this? ...
0
votes
1answer
35 views

Calculate user reputation on creation of vote

I have a question and answer app that is similar in the way stackoverflow works. The vote model is polymorphic and belongs to 3 other models. A vote is created via a member POST route on each model ...
0
votes
0answers
28 views

What is the difference between scopes and self methods in my example?

I faced a case when I need to use find_by_sql. (No other varients were found. It's a topic for another question, but I don't have enough time to explain it). So i have two tables T1, T2 and a ...

1 2 3 4 5 1688
15 30 50 per page