Coder Social home page Coder Social logo

bootstrap-helper's People

Contributors

linyiru avatar matiss avatar mingc00 avatar sebjacobs avatar wuwx avatar xdite avatar zhusee2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-helper's Issues

Move to central organisation?

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?

alerts message

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 :(

Tests!!!

Why there'r no tests/specs? It is impossible to refactor or improve something.

关于set_breadcrumbs这个方法

是否有需要修改set_breadcrumbs方法的行为?不再强制重置@breadcrumbs,添加set_breadcrumbs!方法来做这件事:

def set_breadcrumbs
  @breadcrumbs ||= ["<a href='/'>Home</a>"]
end

def set_breadcrumbs!
  @breadcrumbs = ["<a href='/'>Home</a>"]
end
  • 由于这个before_filter方法的执行会在rails项目ApplicationController的before_filter执行之后,所以导致如需在ApplicationController中动breadcrumb的时候则会报错(还没初始化@breadcrumbs),尽管这个情况可能并不多
  • 虽然不修改这里也可以很多方法解决,如自己初始化,overwrite这个方法,在下级controller中添加skip_filter等...但我觉得这个方法的行为是有歧义的(关键是filter的执行顺序的原因会导致重置),不方便开发者灵活使用这个方法.
  • 再进一步的话,我觉得这个before_filter交由开发者决定何时引入或者何时调用会好点,其实还是很多情况这个方法是无需执行的,如非text/html请求或无须呈现html页面的请求就无必要执行这个方法.

Support for devise

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

Breaks when not using simple_form

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.

bootstrap_helper 没法与 refinerycms集成

我在集成refinerycms 2.1.0 时候发生了与Issue #12 相同的问题,Issue #12 链接里面给出的需要更改will_paginate.rb的gist貌似不太好用啊,是在自己的项目config/initializers/will_paginate.rb 里面么?

Will_paginate dependency

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)

升级Rails 4.0.0.rc2提示依赖问题

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)

uninitialized constant WillPaginate::ActionView::LinkRenderer (NameError)

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:inmodule: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:inblock (2 levels) in class:Engine'

https://gist.github.com/1214011/7ffaa86636e5b5b1fe872f9273834373c58f7ab6 should solve the bug

slim & haml compability

bootstrap-helper does not play nice with slim. i guess same problem may occur with haml too

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.