seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.5k stars 996 forks source link

problem using modal helper - empty content #793

Closed SirBrooks closed 10 years ago

SirBrooks commented 10 years ago

gem 'rails', '4.1.5' gem 'sqlite3' gem 'sass-rails', '~> 4.0.3' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0.0' gem 'therubyracer', platforms: :ruby gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0'

gem 'therubyracer' gem 'less-rails' gem 'twitter-bootstrap-rails', '~> 3.2' gem 'bootstrap_form'

rails generate bootstrap:install less rails generate bootstrap:install --no-coffeescript
rails generate bootstrap:install static

rails g scaffold post title:string content:text
rails g bootstrap:themed posts -f

I inserted this in the app/views/layout/application.html.erb from your documentation:

<%= content_tag :a, "Modal", :href => "#modal", :class => 'btn', :data => {:toggle => 'modal'} %>

<%= modal_dialog :id => "modal", :header => { :show_close => true, :dismiss => 'modal', :title => 'Modal header' }, :body => { :content => 'This is the body' }, :footer => { :content => content_tag(:button, 'Save', :class => 'btn') } %>

It renders the modal form but without any content or button - the form is empty. I tryed to figure it out but I don't know why this is happening. Could you tell what the problem is? I added a screen to show up the problem. rails-error

toadkicker commented 10 years ago

You may have errored when you ran install with the less flag, and then ran it with static. Pick one or the other.

SirBrooks commented 10 years ago

Thank you for the fast reply! Which is the prefered method in your oppinion?

Am 05.09.2014 um 16:49 schrieb Todd Baur notifications@github.com:

You may have errored when you ran install with the less flag, and then ran it with static. Pick one or the other.

— Reply to this email directly or view it on GitHub.

toadkicker commented 10 years ago

Well that's why we give you the option. I like LESS because OOCSS is awesome for large projects. I'm not a purest, but this gave me a lot of ideas of how to manage CSS effectively.

toadkicker commented 10 years ago

For you, I created an example on teststrap. It's in haml, but you can use html2haml.herokuapp.com to convert it to ERB.

SirBrooks commented 10 years ago

I made a little test szenario from the scratch without less and haml to reduce complexity. https://github.com/SirBrooks/rails-twitter-bootstrap-modaltest

I startet a new project, added only twitter-bootstrap-rails and generated one little post scaffold. I used only the bootstrap:install static command and used the bootstrap:themed command for the scaffold. Later I added only the modal_dialog example from your documentation.

I get the same result - the window is showing - but without any content. See my screenshot before.

Could you pls help me to solve this problem?

RyoYamamotoJP commented 10 years ago

This problem is already fixed in master.

https://github.com/seyhunak/twitter-bootstrap-rails/pull/767

SirBrooks commented 10 years ago

Thank you I will try it!

Am 07.09.2014 um 12:42 schrieb Ryo Yamamoto notifications@github.com:

This problem is already fixed in master.

767

— Reply to this email directly or view it on GitHub.

SirBrooks commented 10 years ago

I tryed it out from the scratch again with the master version. https://github.com/SirBrooks/rails-twitter-bootstrap-modaltest-final I works now fine! Thank you!

toadkicker commented 10 years ago

Yeah I need @seyhunak to tag 3.2 release. Sorry for the confusion. We will get 3.2.1 out soon including this, as well as switch to git flow.