xdite / bootstrap-helper Goto Github PK
View Code? Open in Web Editor NEWTwitter Bootstrap Helper for Rails, support will_paginate & simple_form template
Twitter Bootstrap Helper for Rails, support will_paginate & simple_form template
rails (= 4.0.0.beta1) ruby depends on
bundler (< 2.0, >= 1.3.0) ruby
You have renamed your gem 'bootstrap_helper' to 'bootstrap-helper', But There is a url link to the old gem:
see example
The example link link to https://github.com/xdite/bootstrap_helper/tree/master/example/application.html.erb
You should link to https://github.com/xdite/bootstrap-helper/blob/master/example/application.html.erb.
is it right?
Hi!
I am the maintainer of three gems similar to this one that make it easier to use Twitter Bootstrap in Ruby projects (https://github.com/krautcomputing/rails-bootstrap-navbar, https://github.com/krautcomputing/bootstrap-navbar, https://github.com/krautcomputing/middleman-bootstrap-navbar).
I was thinking about moving all those gems to a separate organisation (like "bootstrap-ruby") and wanted to get some feedback from other maintainers of similar gems (and the community at large) if that makes sense and if we could use this to make it easier for people to find gems to work with Bootstrap in Ruby (Rails, Sinatra, etc.)
I think it would also invite other people to contribute to those projects if they were united in a central organisation.
What do you think?
Would you be willing to move this repo to such an organisation as well?
for example
https://github.com/xdite/bootstrap-helper/blob/master/lib/bootstrap_helper/breadcrumb.rb#L25
@breadcrumbs.push("#{title}".html_safe)
better to be
@breadcrumbs.push("#{title.html_safe}")
thanks!
when I exec that code:
<%= notice_message %>
I got this message:
<div data-alert="alert" class="alert-message success"><a class="close" href="#">x</a><p>接口成功修改.</p></div>
alert-message should change to alert alert-success
sorry , this is my fault . because my bootstrap_helper is 1.4.1 :(
Why there'r no tests/specs? It is impossible to refactor or improve something.
是否有需要修改set_breadcrumbs
方法的行为?不再强制重置@breadcrumbs
,添加set_breadcrumbs!
方法来做这件事:
def set_breadcrumbs
@breadcrumbs ||= ["<a href='/'>Home</a>"]
end
def set_breadcrumbs!
@breadcrumbs = ["<a href='/'>Home</a>"]
end
Hello
First of all, this is not a bug
but it might be annoying if someone uses this gem with Devise gem
I mean is, in the Devise gem, there timeoutable module that store its data in a flash
check this heartcombo/devise#1777
so it will show
class = " .... alert_timedout"> true </ div>
so what if the method notice_message be like this
def notice_message
flash_messages = []
filtered_flash = flash.delete(:timedout)
filtered_flash.each do |type, message|
type = :success if type == :notice
text = content_tag(:div, link_to("x", "#", :class => "close", "data-dismiss" => "alert") + message, :class => "alert fade in alert-#{type}")
flash_messages << text if message
end
flash_messages.join("\n").html_safe
end
or maybe you could make it more customizable
I'm using formtastic, not simple_form.
When I include this gem in my Gemfile, it breaks with the following:
uninitialized constant SimpleForm
/Users/kmandrup/.rvm/gems/ruby-1.9.3-p125/bundler/gems/bootstrap-helper-fc4818d80dc5/config/initializers/simple_form.rb:2:in `<top (required)>'
You should wrap this piece of the code with if defined?(SimpleForm)
.
I will make a fork and a pull with this fix ASAP.
I'm not familiar with how this is supposed to be implemented but putting bootstrap_helper in my Gemfile is not sufficient to get will_paginate installed. Instead if I run rake -T I get this error:
no such file to load -- will_paginate/view_helpers/link_renderer
Not clear why the gem has this dependency though, maybe it can be removed or at least don't be so specific in required verion?
j3: gem list will
*** LOCAL GEMS ***
j3: gem inst will_paginate
Fetching: will_paginate-3.0.2.gem (100%)
Successfully installed will_paginate-3.0.2
1 gem installed
j3: rake -T db
rake aborted!
no such file to load -- will_paginate/view_helpers/link_renderer
(See full trace by running task with --trace)
j3: gem list will
*** LOCAL GEMS ***
will_paginate (3.0.2)
怎样把Home改为中文?
Bundler could not find compatible versions for gem "railties":
In Gemfile:
bootstrap_helper (~> 4.2.2.1) ruby depends on
railties (= 4.0.0.rc1) ruby
railties (4.0.0.rc2)
Hi,
I wonder, why are you showing all content from the flash in your notice_message
helper? There can be stored anything in the flash.
See seyhunak/twitter-bootstrap-rails#526
p.s. Also, you could use link_to('×'.html_safe, ...)
instead of link_to('x', ...)
for close button so it'd be more cute
Can't add dividers or dropdowns to render_list, probably because adding a css class to an 'li' tag is not possible, e.g.
When starting server, an exception is raised:
.rvm/gems/ruby-1.9.3-p194@/gems/bootstrap_helper-2.1.0/config/initializers/will_paginate.rb:10:in <module:ActionView>': uninitialized constant WillPaginate::ActionView::LinkRenderer (NameError) from /.rvm/gems/ruby-1.9.3-p194@/gems/bootstrap_helper-2.1.0/config/initializers/will_paginate.rb:4:in
module:WillPaginate'
from/.rvm/gems/ruby-1.9.3-p194@/gems/bootstrap_helper-2.1.0/config/initializers/will_paginate.rb:3:in <top (required)>' from /.rvm/gems/ruby-1.9.3-p194@/gems/railties-3.2.6/lib/rails/engine.rb:588:in
block (2 levels) in class:Engine'
https://gist.github.com/1214011/7ffaa86636e5b5b1fe872f9273834373c58f7ab6 should solve the bug
bootstrap-helper does not play nice with slim. i guess same problem may occur with haml too
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.