I am trying to make gsub on my column before save or update. Here is my controller: def dansk(text) self.text.gsub(\'å\', \'å\')
I\'ve got a controller with an update method that updates the model attribute, sets a flash notice for the user if successful and then renders the edit page again. The next link I click on the same fl
Inside my test database, I would like to trigger a \"new_item\" flag for testing.The method already works in my tests.So now I am setting the created_at and published_at fields of all records to 1 mon
I\'m working on an app that has the models User and Project, and User can be assigned to multiple Projects, via ProjectUser, with a role (e.g. Developer, Designer).
I have a url that I am using in one of the controllers. Is there a better place to put this url? The url uses an API key and I was wondering if there is a better place to add this url and/or api key s
I use rvm in my rails project and specify gem versions in the Gemfile. However, my problem right now is different. I want to create a rails 3.1 project using rails new project_name but my current ver
I want to take control of the way rails handles the display of errors, I want to keep using the FormBuilder and I don\'t want to use Formtastic (Love formtastic but like all things helpful it\'s great
My scaffold generator stopped working after we updated factory girl.Here\'s why happened.First, my config file tries to set up certain defaults for scaffold generation, like so:
I\'m creating an external service of my rails app. This is always listening a rabbitmq queue and all their messages should be redirected to some methods of the rails controllers.
I have finally gotten the on_the_spot gem working in my rails app, which uses devise for authentication.