While developing a Rails app, I usually leave the dev server running locally (mongrel) as I work on the code. Changes in the code take affect after a quick refresh. EXCEPT changes havent been taking effect for a class I've been writing in the Lib in folder. Is this in any way a known problem? What could be causing this? It is very frustr...
I'm using the DOM Popup Kit to create Netflix like popup windows when a user hovers over an image.
The kit requires me to place the popup content in a div at time of page loading. The page I'm using this functionality has about 100 images, thus having to create the div content for all 100 images is slow. Thus I would like to update th...
Getting an odd error. Just installed the Typus rails admin plugin, which is supposed to work in 2.3.2. However, after install it seems to mess with my user model. Not sure where to start here, any ideas?
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/Users/apple/.gem/ruby/1.8/gems/activesuppo...
I recently upgraded a rails project I am working on from 2.0.5 to 2.3.2. I noticed that there was a local copy of the 2.0.5 rails files in vendor/rails and I was wondering should I put a local copy the 2.3.2 rails files in there too or just leave them out? What is considered a better practice?
...
Hi,
I have just started Rails and have a basic question.
I need to add customer properties(like email id etc) so that the Rails app can read them at runtime. How can I do this ?
Can I add them to development.rb and if so how can I read it ?
In java I would have created a properties file and read it from my app.
thank you,
firemonk...
I have inherited a project with a local development environment that has code specific to that machine, and which is different for the production server. Even though the majority of it is contained in constants and the rest is in the tests, every time I commit from development and update in production I'm going to have to make the same ...
Hi,
I have a list of items displayed on my page.
Item A [Edit]
Item B [Edit]
Item C [Edit]
Each item is editable When you click on a edit icon.
The edit form is displayed with a ajax call and the controller return a form.
Edit form for Item A [Save]
Item B [Edit]
Item C [Edit]
But all the list is bulk editable and so each item h...
By default, Ruby on Rails stores session data in cookies. This has many advantages, such as the lack of need to setup any persistence layers on the server side. However, the session data is not encrypted, and the Rails app that I'm writing puts potentially sensitive data in the session. I'd like to avoid storing session data server-side ...
I'm starting to read up on Capistrano after using Rake tasks to deploy apps for a long time. It's really striking how similar it is to Rake. A lot of parallel commands (like cap -T) and a lot of identical concepts (namespaces, tasks).
Does anyone know the history behind that? Is Capistrano an extension of Rake, or built on top of it?
...
Hi, all.
I recently told a friend that I was starting to learn Catalyst (Perl) and he fairly strongly emphasized that because Catalyst has so freakin' many dependencies, I should use something like Rails instead.
Isn't that a good thing that there are a lot of dependencies? Doesn't that indicate a lot of code re-use? I understand tha...
I have a products model set up that I am trying to search with Thinking Sphinx. The model has an attribute called status which can be Active, Not active or Active during specified dates.
I would like to be able to restrict my search results to products that are active. I.e. has status of active or has status of active during dates and ...
Looking at different options:
One is to just put the static pages in the public/ folder, but I do want the header from layout/application to be consistent.
I tried this, but I got an error:
in routes.rb:
map.connect '*path', :controller => 'content', :action => 'show'
in content_controller.rb:
def show
render :action => params[:pat...
Hello,
I am having a major issue with creating a Rails Project on Aptana (using mac os x). Basically, when i try starting a Rails project and name a file, it comes back with an error saying:
"!!! Path to log file not valid: /Users/fab/Documents/Aptana Studio Workspace/test.rb/log/mongrel.log mongrel::start reported an error. Use mong...
I'm running into an issue with different users uploading files with the same name being overwritten with the Polymorphic Paperclip plugin. What I'd like to do is inject the current user's ID into the URL/path. Is this possible? Would I be better off generating a random name?
Here are my current :url and :path parameter values in asset.r...
I have RSS-reader class for Ruby, and I'd want to use it in rails, where does the rss_reader.rb go? To "libs/rss_reader.rb"?
I tried that, then requiring it in controller, but I get error: 'MissingSourceFile (no such file to load -- lib/RssReader)'
...
Hi there, in rails when you register filters in abstract superclasses they come before the filters registered in the controller class. Say I wanted to execute a method called authenticate as a filter right at the end of the filter chain. The only way I can figure it out is to declare that before_filter as the last filter in all my contro...
I am working on an Rails app which has an admin section for setting up organisations. The hierarchy of which is:
Organisation
Area Office
Division
Department
I have used ActiveScaffold to knock together something really quick, but it makes for a pretty horrid UI. To edit/add a department, I have find the organisation in the tab...
Hi there,
I'm undertaking a rather large conversion from a legacy database-driven Windows app to a Rails app. Because of the large number of forms and database tables involved, I want to make sure I've got the right methodology before getting too far.
My chief concern is minimizing the amount of code I have to write. There are many mode...
What would be the best approach to develop an "extension" system for a Rails application?
I mean the same kind of system that WordPress has, like registering functions to hooks, etc. Then plugins could be activated/deactivated from an admin panel.
Are there some books/online material about implementing this kind of functionality in RoR...
Hi
I know this is something simple I am doing wrong.
I have three tables, installation, neighborhood, schools
Installation:
has_many :schools
has_many :neighborhoods
Neighborhood:
has_many :installations
has_many :schools
Schools:
belongs_to :installations
belongs_to :neighborhoods
I can't figure out how to show the name...