Rails- nested content_tag

You need a + to quick fix 😀 module InputHelper def editable_input(label,name) content_tag :div, :class => “field” do content_tag(:label,label) + # Note the + in this line text_field_tag(name,”, :class => ‘medium new_value’) end end end <%= editable_input ‘Year Founded’, ‘companyStartDate’ %> Inside the block of content_tag :div, only the last returned string would be displayed.

Why are all Rails helpers available to all views, all the time? Is there a way to disable this?

@George Schreiber’s method doesn’t work as of Rails 3.1; the code has changed significantly. However, there’s now an even better way to disable this feature in Rails 3.1 (and hopefully later). In your config/application.rb, add this line: config.action_controller.include_all_helpers = false This will prevent ApplicationController from loading all of the helpers. (For anyone who is interested, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)