I'm trying to deploy a small rails3 app to a FreeBSD host using capistrano and bundler. I have added the line
require 'bundler/capistrano'
to my deploy.rb file, and bundler seems to work fine until it comes to the mysql2 gem. Here the install fails because the install script uses chmod and chgrp to try to install the gem with root:whe...
Hello Rubsters
So, I need to be able to display a small 'about our products' blurb on every single one of the product pages. I also need this blurb to be editable through the app interface, and not appear as a static page alone.
I have a static Page model with title, permalink, and content; and PagesController set to find_by_permalink ...
Hello? Any paper_clip wizards out there know if you can when using paperclip to save an image, also save the image dimensions (width&height) in 2 extra fields? How do you get such data during the paperclip upload process?
Thank you
...
I think what I'm trying to do is pretty simple, and I'm really not sure why this isn't working. I'm using Rails 3.
Essentially, I'm just trying to select the distinct values from a column in an existing model, and print them out all. For the most part, this works but the .each loop in my view also ends up printing the entire array at t...
Hello, I'm interested in learning how to AJAX a modal dialog. Typically if I wanted to add a modal dialog to my web site I added the jquery UI dialog code in my main JS file and binded it to an ID.
I believe with Rails I can create a Link, which fetches all the dialog code from the server and then opens the dialog.
Is this true?
If so...
In Rails 3, is there a way to link to a controller's action using ajax without having a named route?
I tried <%= link_to 'Reload', '#', url_for(:action => :reload, :id => @user.id), :remote => true, :method => 'post' %>
but it returns with the error No route matches {:controller=>"users", :id=>2, :action=>"reload"}
My main concern is...
I can't seem to find any documentation on how to do the following: I need to provide a config variable for any applications using my engine so that they can easily pass settings to my engine.
Does anyone have any links to a proper or accepted way to do this?
EDIT: As an update, I figured out a decent way to do this. Code is below.
# f...
When I just the to_json method it seems to ignore all other options... any ideas how to fix this?
var places = <%=raw @location_for_map.limit(5).to_json(:only => [:name, :lat, :lng]) %>;
I'm trying to plug in points from json on a google map, but noticed the points never got smaller with any of my scopes. where, order, limit...
I cou...