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

Active Admin image upload with refile
AuthorizationAdapter in ActiveAdmin
ActiveAdmin and Rails Engine. How do you keep the path name the same?
Active admin defining scope for custom page
ActiveAdmin: Can I redirect the user to the index after they create/edit something?
Active admin and Pundit
Sortable for has_many does not sort properly
select2 remove tag_list item
Adding Numeric Range Filtering to ActiveAdmin
undefined method `destroy_user_session_path' for active admin with cancancan and sorcery
Active admin not working in production mode
ActiveAdmin cannot authorize in rails-api project
How can I create an ActiveAdmin filter that will show only objects without a value specified?
jQuery, activeadmin: custom filter with ransack. how to alter displayed text in search box
ActiveAdmin lable name cant be singular
ActiveAdmin not decorating show view

Categories

HOME
php
amazon-web-services
xcode
adfs3.0
long-integer
compilation
subdomain
apk
celery
elisp
amp
share
impala
tweepy
jpa-criteria
colors
webstore
mailgun
twisted
temperature
significance
spring-shell
backtracking
pymongo
animated-gif
javax.persistence
source-insight
autodesk-model-derivative
python-2.x
delayed-job
knights-tour
om-next
cloudera-manager
advanced-filter
redgate
nanogallery
xll
hypothesis-test
vungle-ads
httphandler
roracle
libreoffice-writer
cordova-ios
iptv
subforms
mura
android-mediarecorder
stateless-session-bean
zend-server
hmmlearn
annotatorjs
django-testing
seccomp
dpkg
eclemma
maximize
jeditable
distributed-cache
xcopy
onepage-checkout
arbre
openshift-cartridge
modern.ie
dynamics-ax-2012-r2
swagger-maven-plugin
kefir.js
shell-extensions
mgwt
mod-auth-openidc
tkx
google-hangouts
rebar
window-resize
quantify
libgcc
otl
cloo
disjoint-union
ax
microformats
donut-chart
2d-vector
monocross
exponent
startupscript
fragment-identifier
nsconnection
dip
ios-4.2
fgetc
ning
iphone-sdk-3.1.3
twitter-feed

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App