0
votes
1answer
29 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 ...
0
votes
0answers
30 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 - ...
1
vote
1answer
18 views

Roo spreadsheet uploading OLE2 signature is invalid

Right so I've checked out Roo. Great gem and all and have a really basic application that doesn't have no models. And basic controller, class and view and I can't seem to get a spreadsheet to upload ...
0
votes
0answers
18 views

'Add to Cart' button fails using 'Display: inline' in in Agile Web Development with Rails (4th edition)

I cannot make my 'Add to Cart' button inline next to the product price, for some reason that I do not understand, the button appears below the product price. Here my development settings: ruby ...
0
votes
2answers
32 views

Get unique values by ID rails

This is how I am showing the records of orders: <% @orders.uniq.each do |order| %> <% @count += 1 %> <tr class="even border_text"> <td ...
-2
votes
0answers
35 views

How to m to m mapping search query rails? [on hold]

I have tables: desc genres_videos; has_and_belongs_to_many :videos, :conditions => ["`videos`.deleted_at is null"] +----------+---------+------+-----+---------+-------+ | Field | Type ...
0
votes
3answers
44 views

How to update param in update in rails

When I receive a solicitation, I try to change my date to nil, but it's not working. It doesn't save in database. def update @solicitacao = Solicitacao.find(params[:id]) if ...
1
vote
1answer
31 views

Rails form disable_with option with 2 submit buttons start disabling other button also when i click one

In my rails app i am using three buttons, save submit and cancel. I used disable_with option for save and submit with values saving... and submitting. But the problem is when click any save or ...
-2
votes
0answers
24 views

rails return a specific or a collection of id [closed]

In this code i would like to return just some id or a specific id. def show Help.find(params[:id]) if request.path != help_path(@help) redirect_to @help, status: :moved_permanently ...
0
votes
1answer
29 views

Working with existing database of a rails project

I want to run a ruby on rails project in my Ubuntu 12 mechine.After running the command bundle install i used the following command rake db:drop db:setup it shows -- ...
0
votes
1answer
50 views

Ecommerce -shipping and billing address into one table in rails

I'm trying to create an address form with shipping and billing address on same page. When user gets ready for checkout , I want both shipping address form and billing address for to appear on same ...
1
vote
1answer
23 views

Rails - Iterating through records witin a method

I have a method that just iterates through various models, printing out the model attributes: def self.get_attributes(options = {}) options[:model_name].find(:all, :conditions => {:generated_at ...
1
vote
1answer
25 views

Rails parse Invalid Date Error

Im trying to figure out why I keep getting a invalid date error for certain dates. For example: This works: e = "07/02/2013" => "07/02/2013" start_date = ...
1
vote
0answers
15 views

How can i define my error pages in CMS?

I have rails 3.2.6 and BrowserCMS my application Error pages(404, 500) in public folder, but i need to define my Page Not Found, Access denied, Internal server error page in BrowserCMS. # Exception ...
1
vote
2answers
53 views

How do I call another task in Rake

Although this might sound similar to the other questions you find here, there is a slight twist. I have two directories, say /home/rails/Rake and /home/rails/test_app. The rails directory is where I ...

1 2 3 4 5 223
15 30 50 per page