RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: regedarek
Hi guys,
How to refactor link_to_function using UJS since it will be deprecated in Rails 4.
def link_to_add_fields(name, f, association) new_object = f.object.class.reflect_on_association(association).klass.new fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder| render(association.to_s.singularize + "_fields", :f => builder) end link_to_function(name, h("add_fields(this, \"#{association}\", \"#{escape_javascript(fields)}\")")) end
Guys, do you know how to after updating object always change state to awaiting_review? I am using workflow gem.
Is any substitute for fancy_irb when im using pry instead of irb ??
Hi guys,
How to refactor link_to_function using UJS since it will be deprecated in Rails 4.
Guys, do you know how to after updating object always change state to awaiting_review? I am using workflow gem.
Is any substitute for fancy_irb when im using pry instead of irb ??