activeadmin


Rails 4 cocoon gem not working with js


I have trying to use cocoon dynamically nested form in my rails 4.1 + active-admin application. am not getting any errors but the add / remove links are not working.
when i checked in the browser with firebug the cocoon.js is not included with my application.
did i miss something in cocoon installation
my rails version
Rails 4.1
i added gem "cocoon" in gemfile and done bundle install
added assets/application.js:
//= require cocoon
then in my lease_informations/new.html.erb:
<div>
<%= semantic_form_for [:admin, #lease_information] do |f| %>
<%= render 'form', f: f %>
<center>
<%= f.actions do %>
<%= f.action :submit, label: "Save" %>
<li class="cancel">
<%= link_to :cancel, admin_employees_path %>
</li>
<% end %>
</center>
<% end %>
</div>
in _form.html.erb am rendering _lease_units.html.erb
with lease_informations/_lease_units.html.erb :
<div id='lease_units'>
<%= f.semantic_fields_for :lease_units do |lease_unit| %>
<%= render 'lease_unit_fields', :f => lease_unit %>
<% end %>
<div class='links'>
<%= link_to_add_association 'Add Units', f, :lease_units %>
</div>
</div>
with lease_informations/_lease_unit_fields.html.erb :
<div class='nested-fields'>
<%= f.inputs do %>
<%= f.input :unit_type %>
<%= f.input :unit %>
<%= f.input :floor %>
<%= link_to_remove_association "Remove Unit", f %>
<% end %>
</div>
my model lease_information.rb
class LeaseInformation < ActiveRecord::Base
has_many :lease_units
has_many :lease_contacts
belongs_to :lease_type
belongs_to :sales_category
accepts_nested_attributes_for :lease_units, :reject_if => :all_blank, :allow_destroy => true
end
this generate no error but not adding or removing nested form fields.? could anyone help?

Related Links

ActiveAdmin won't save has many and belongs to many field
Truncate data in ActiveAdmin index page
Active Admin: how to set filter label dynamically
How to add an HTML-class to an ActiveAdmin index table
How to use modules to split very long code in active admin?
Downloading all records of a paginated resource in ActiveAdmin
Can you use the Form() command in ActiveAdmin in the content of a custom page?
CollectionAction route being skipped, action treated as ID
Possible to “split” an ActiveAdmin resource between multiple menu items?
Rails: activeadmin, undefined method `per' for #<ActiveRecord::Relation:0x4d15ee0>
Active Admin create form in register_page
ActiveAdmin - how to customize edit action?
ActiveAdmin - Filter with default value
Make semantic_errors render the exact error-message
ActiveAdmin - Custom action with reusing the show form
make checkboxes for a has_many :through association using Formtastic

Categories

HOME
knockout.js
android-studio
ontouchlistener
applescript
bots
add-on
foaf
dronekit-python
openfoam
timber
polymer-2.x
gtk
azure-graph-api
lc3
migrate
nsstring
erd
synthesis
phonegap-build
office-ui-fabric
pfobject
pst
device
ava
software-packaging
pubxml
prompt
running-object-table
progid
mapnik
actframework
serversocket
java-stream
ftp-server
installanywhere
eclipse-gmf
unification
hidden-markov-models
plane
ipp-protocol
tinyioc
xcglogger
nonlinear-functions
sonicmq
nusoap
cordova-ios
redisson
http-basic-authentication
sesame
dblink
maatwebsite-excel
bigdecimal
streamwriter
libharu
e
data-management
groovyfx
right-to-left
bbc-micro
openmrs
m4
cortana
supercomputers
replicaset
mobilefirst-server
python-c-extension
mod-auth-openidc
tabris
libgcc
git-reset
commenting
pageviews
wso2bam
ember-table
node.js-stream
handshake
gprof
gitx
nsmutablestring
getopt-long
coordinate
websphere-6.1
first-class
prefuse
quartz-core
background-repeat
differentiation
photo-management
grails-validation
downgrade
oracle-pro-c
ntruencrypt

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App