Hi All,
Is there any way in Rails to have the ENV reload "lib" files without having to restart the server? I'm working with some classes that I have inside a module in "lib". However, in order to see my changes I must restart the server each time. I'm guessing this is the way Rails is intended to work, but it is quite tedious when de...
Can a plugin be packaged as a JAR/WAR file similar to the way in which an entire Rails app can be packaged for deployment on JRuby?
...
Hi All,
What is the most straightforward mechanism by which to "link_to_remote" and popout a window with the data? I need "link_to_remote" because I need to pass certain data along with the url without redoing my routes. If this would be better served by a "link_to" without the need to redo my routes, I'm all for it. I simply can't g...
Hi All,
I currently have an application that calls creates and displays charts from various objects' data using JS. However, I'm having some severe issues. Can someone please explain why the following code works just fine when statically inserted into a page, but when used via rjs "page.replace_html my_div_id" it removes EVERYTHING EL...
Hi All,
How do you ensure that your javascript includes get included properly for all files everywhere using a particular layout? Basically I have some non-restful actions that I've added. I haven't added any ROUTES for them, however, using normal text rendering works fine. It's when I start requiring different "swf" and "js" files (...
I would like to create a method in additional to the default 'foo'.titlecase that will correctly add "possessiveness" to it.
The string is a user's name (<- just did one right there! )
For example: "sam" is the user
<%= user.titlecase.possessive + ' Profile' %> => #Sam's Profile
It just needs to handle edge cases like:
Steelers's Pr...
Hi All,
I have a bit of a situation. I've consumed about fourty-eleven different tutorials/books/videos on Capistrano, and none of them touch on out-of-the-norm cases. They all assume straightforward setups -- which, in my experience, is rarely the case.
Basically my situation is as follows:
1) I am developing the application on a s...
I have a form to a search engine. I want to search for the searchterm in all fields of a specific model.
I'm using the searchlogic plugin. It gives me a lot of new finders but i cannot do a OR between two fields.
for example:
How can i do a "SELECT * from my_table WHERE field1 LIKE '%xpto%' OR field2 LIKE '%xpto%' ?
Specially in the...
Hi, I am having a problem with using session variables. I have two controllers named 'graduate_students_controller' and 'current_students_controller'. Each of these controllers control different view files. I am using session variables with both these controllers to store session information.
Here's the problem. Let's say I have two vie...
Hi all.
When uploading photos I got inconsistent rollbacks in the log file. I selected the same picture over and over again until the system accepted it, after the 3rd to 12th try.
This stopped after I added the photo.valid? before photo.save.
My code uses attachment_fu, below you can see the controller code:
@album = @listing.album...
I'm trying to get Hpricot working with Rails on my dev machine.
I've installed Hpricot [0.8.1] using the standard 'gem install hpricot' and confirmed it works fine with my standard Ruby installation [1.8.7]; however when I try the same with my Rails [2.1.0] installation, I get an error -
TypeError: superclass mismatch for class BogusET...
I am new to emacs and I would like to use emacs-rails for editing rhtml files. I have been at it for awhile with no luck. I have followed the directions on this page
http://developer.idapted.com/2009/1/13/install-and-config-emacs-for-rails
I get an error that Symbol's value as variable is void "/.emacs.d/rails"
This just seems to be mo...
Hello,
I want to implement an application in Flex/Rails in Background as I know these two languages but I'm fairly beginner with Flex and Intermediate-to-expert with Rails. My application will display a calendar like object by which there are say 5-day week or 7-day week or a month (30-days) and in each day there will be some data such ...
I am working on a simple invoicing and accounting applications, but I am totally lost on how to represent accounting-transactions(journal-entries) in a database. Using a separate debit and credit column in the database seems like one way, but most of the Open Source Accounting I have seen use a single amount column. This I assume simplif...
I know how to get paths and urls no problem (eg. new_color_path for the Model Color) but what if I am trying to create a partial that can be used for multiple models and I still nee the "new_***_path" or one of the others? Is it possible to generate the url from a model object?
...
I have the following RSpec example which is passing:
describe UsersController do
it "should render new template on new action" do
get :new
response.should render_template("users/new")
end
end
The problem is I have not implemented the 'new' action on the UsersController.
Can anyone tell me why this test is passing?
I am ne...
Hey guys.
I am working on some code that scrapes a page for two css classes on a page. I am simply using the Hpricot search method for this as so:
webpage.search("body").search("div.first_class | div.second_class")
...for each item found i create an object and put it into an array, this works great except for one thing.
The search...
Hello guys,
i've developed small web app for personal use with Ruby on Rails. Now when i want to use it I open Terminal and run ruby script/server to run mongrel then i go to Safari and type localhost:3000 to see my app.
I'd like to have this site start automatically on startup of mac and possibly to use some other URL.. preferably just...
I've gotta use the inventory from quickbooks in my rails web app...it would be nice if I could get quickbooks to use mysql, as that way I could just use mysql between the app and quickbooks, which would make things easy.
Does anyone know how to get quickbooks to use mysql? Or will I be forced to have my app communicate directly with qu...
I have a slightly complicated query that I'd like to have as a natural ActiveRecord relationship. Currently I call @calendar.events and @calendar.shared_events then join the arrays and sort them. The consolidation is able to be done with this sql:
SELECT calendar_events.* FROM calendar_events left outer join calendar_events_calendars on...