actionpack

What approach do you take for embedding links in flash messages?

The ability to have flash messages (notice, error, warning, etc) with embedded links is nice from a user interaction standpoint. However, embedding an anchor tag inside a flash message from the controller is dirty. Let's assume that a flash message like this is good for usability*: (borrowed from DailyMile.com) What tactic would you...

ActionPack Generator for 3.0

IS there a actionpack/subsonic generator for 3.0 like there was for 2.0? ...

In the update action a NoMethodError is thrown

This is my source code def update @recipe = Recipe.find(params[:id]) respond_to do |format| if @recipe.update_attributes(params[:recipe]) format.html {redirect_to :action => "edit" } end end end I get an error on this line respond_to do |format| and the error message is "You have a nil object wh...

What is the opposite of url_for in Rails? A function that takes a path and generates the interpreted route?

Hi there, Brain's a little fried....How do I get a hash of the :controller and :action from a relative_path? This is basically the opposite of url_for. in the example below, "some_function" is the mystery function name I'm looking for...I know it's easy, just can't remember or seem to be able to find it in the docs. Like so: some_fun...

'uninitialized constant ActionPack' when starting rails

When starting my rails server I'm getting an 'uninitialized constant ActionPack' error. raw stack trace I'm using blunder with rails 2.3.8 running 'bundle list' shows: * actionmailer (2.3.8) * actionpack (2.3.8) * activerecord (2.3.8) * activeresource (2.3.8) * activesupport (2.3.8) * acts-as-taggable-on (2.0.6) * auth...

Capturing Rails 3 Multiselect Input Params

I have a multiselect form control (fig. 1). When I select more than 1 value, Firefox sends both values (fig. 2). But only the last value gets sent as a input value to my controller (fig. 3). How do I get all those values passed on to my controller? <form action="html_items/search" method="post" > <!-- Criteria --> <div styl...

date_select tag when upgrading from 2.1.2 to 2.3.8

We are currently in the process of upgrading our rails version and I have come across some weird error in one of my date_select tags. Here is the culprit: <%= date_select :consultant_assignment, :start_date, :order => [:day, :month, :year], :start_year => 5.years.ago.year, :end_year => 5.years.from_now.year, :use_short_month => t...

rails form options helpers: is using a non-integer :selected value possible? (preselect)

i am trying to get a rails select form options helper to get a :selected value that is non-integer. actually i am using the object-id format from mongodb. the html example: <option value="4c613e3c8ee60a1c31000024">test</option> rails select: <%= select( "question", "#{number}", active_question.answers.collect{|x|[x.title, x.id] },{:...