# module ApplicationHelper

### Public Instance Methods

devise_mapping() click to toggle source

    # File app/helpers/application_helper.rb, line 10
    def devise_mapping
            @devise_mapping ||= Devise.mappings[:user]
    end

javascript(*files) click to toggle source

    # File app/helpers/application_helper.rb, line 14
    def javascript(*files)
      content_for(:head) { javascript_include_tag(*files) }
    end

link_to_add_object(name, f, association, css_class, i) click to toggle source

    # File app/helpers/application_helper.rb, line 19
      def link_to_add_object(name, f, association, css_class, i)
      new_object = f.object.class.reflect_on_association(association).klass.new
      fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder|
        j = i + 1
        new_object.number = j
        render(association.to_s.singularize + "_fields", :f => builder)
      end
      link_to_function(name, "add_object(this, \"#{association}\", \"#{escape_javascript(fields)}\")", :class => css_class)
    end

resource() click to toggle source

    # File app/helpers/application_helper.rb, line 6
    def resource
            @resource ||= User.new
    end

resource_name() click to toggle source

    # File app/helpers/application_helper.rb, line 2
    def resource_name
            :user
    end