I am upgrading an application from Rails 2.2.x to 2.3.x and keep getting url_for method missing errors. Any idea what would be causing the core helper methods to be missing?
ActionView::TemplateError (undefined method `url_for' for #<ActionView::Base:0x1053e8ea0>) on line #13 of app/views/site/_front_page_feature.html.erb:
...
Hi
Im new to rails and would like to implement authorization and authentication for my app, is there any good walk-through from the installation of the plug in to getting role based authorization implemented?
thanks
...
I have 3 models defined:
Palette (has many swatches)
Swatch (has one color)
Color (?)
How should the tables / associations be defined so that from the Palette object you can collect all the colors, for example:
@colors = @palette.swatches.colors
(Swatches currently store a color_id, palette_id, plus some related info such as sort_...
I am passing the contents of a textarea in my rails view to the server by a POST call.
How can I store the contents as a separate file, say contents_userId.txt on my server and at the same time store my file in database allowing me to access the various files a single user has...or for any other purpose.
...
I wonder why it's so difficult to set up a server for live notifications with Comet.
Will this ever be implemented in existing frameworks like Rails?
It's popularity is huge, but it's still not easy to get it up and running.
What options are there for Rails applications today?
Thanks
...
I want to know more plugins or gems which can help to make my rails application more powerful and efficient and easy to handle.
Like
mysqlplus instead of mysql
memcached
delayed_job
resque
capistrano
...
I have various files of extensions .cpp stored on the server. When user clicks on the compile button, I should run gcc command passing the absolute path of the file to gcc compiler and then show the user the output of the file.
How can i do that???
...
I have established a relation between project.rb and keyword.rb using has_and_belongs_to_many.
I now want to query in my projects-controller all projects linked to a certain keyword. What is the easiest way to query the joined table keywords_projects?
Where is the connector from projects.rb to the joined table?
@projects = Project.find...
I'm working on an app where I have a user preference to show distances or weights in metric or standard units. I'm using a filter to save the units in a consistent format in the database
before_save :convert_distance
What's the best way to display these units in my views? I tried adding a getter in my model called display_distance l...
Hey all,
I am following instructions on how to deploy rails application on server.
I did the following:
sudo gem install passenger
passenger-install-apache2-module
Everything is successful so far. But next on instruction he uses:
nano /etc/apache2/sites-enabled/000-default
Problem is there is no apache2 directory in etc. Theref...
I have a Person model that has a many-to-many relationship with an Email model and I want to create a factory that lets me generate a first and last name for the person (this is already done) and create an email address that is based off of that person's name. Here is what I have for create a person's name:
Factory.sequence :first_name ...
I admit I've cobbled together a mostly working production setup on Ubuntu with Capistrano from the official docs (which seem dated and make a lot of assumptions) and various blog posts of varying outdatedness. Anyway, the last annoying hang up is that indexing works when I do it by hand (and on deploy I'm pretty sure), but doesn't work ...
I need to create no follow links with link_to.
I'm looking for something like this:
<%= link_to "example", example_path, :target => "_blank" %>
But for no follow of course.
...
Hi
i have been trying to change the homepage of my app for over and hour and searched the net but cant find anything, i have map.root :controller => "welcome" set in the routes.rb file and i have deleted the index.html.erb file in public and http://0.0.0.0:3000/ still takes me to the welcome to rails default page.
i have a welcome con...
So when I define an association in rails do I have to set the foreign key as an index in the database?
My friend told me to do this to improve performance, but he is a PHP programmer.
...
I am using ExtJS with a rails backend and would like to use an MVC pattern. Does anyone have any insite on this?
...
Hi, I have many sphinx_scopes in my application's models, but one of
them doesn't work, I think it's because the odd way Sphinx store the
associated values.
As an example I will show some key pieces of my Product class model,
product.rb:
...
belongs_to :partner
# And partner belongs to city
...
define_index do
...
has partner.cit...
I have a rails application on a shared server that also has a decently sized database, which is still growing, behind it. The application takes a long time to start/load the homepage, about 20-30 seconds for me, although some people report waiting up to several minutes.
Is there a way to flash a notice that informs people that the datab...
I'm making a message board application. Users can make a post, each post requires a tag. Users can comment on the posts. Pretty simple. I've been hacking away on it and got an error I can't explain. I made a post, message#index shows the the list of posts including the newest one. The title of each post links to the message#show view (no...
Like request.referer, I want to know from which controller/action the user is coming from. Is there a method do to this? All I could think of is to use a flash, any better method?
...