Git Product home page Git Product logo

table_builder's Introduction

table_builder's People

Contributors

jduff avatar p8 avatar sdague 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

table_builder's Issues

Error with rails 2.3.8

Hi, I have a bug with the plugin when I try to show in the calendar view sale "undefined method` safe_concat '"I work with rails 2.3.8 and ruby 1.8.7. my code is this

<% calendar_for (@ turn) do | t |%> <% = t.head ('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun')%> <% t.day (: day_method =>: date) do | day, tasks |%> <% = day.day%>
<% tasks.each do | task |%> <% = h (task.name)%>
<% end%> <% end%> <% end%>

passing :id to day() - can id be based on the collection

This is what I need to achieve:

<% calendar.day(:day_method => :target_date,:id => !blackouts.empty? ? "blackout" : "") do |date, blackouts| %>

I know that's referencing blackouts before blackouts is created. How would one do this?

Thanks in advance!

example of options you can pass to the day method

I need to highlight specific dates in a calendar_helper (some are to be blacked out on our calendar). So I need to do something like this:

  <% calendar.day(:day_method => :target_date) do |date, changes| %>
    <% if ScheduledBlackout.on_date(date).size > 0 %>
      <%= date.day  *options here to differentiate this day* %>
    <% else %>
      <%= date.day %>
    <% end %>

Can you tell me what kind of options the day method supports? Can I tell it which css class to render?

Read me error in "Install"

For a pre rails 3.0 table_builder:
script/plugin install
git://github.com/p8/table_builder.git
cd vendor/plugins/table_builder/
git checkout pre-rails-2.2

last line need change:

git checkout pre-rails-3

Doesn't work within a Helper

This looks great but it relies on the <%= ... %> construction for th and td elements to be displayed.

If you move the example code into a helper, e.g.

def example
    @front_men = [FrontMan.new(1, 'David St. Hubbins'), FrontMan.new(2, 'David Lee Roth')]

    table_for(@front_men) do |t|
      t.head do
        t.r do
          t.h('Id')
          t.h('Name')
        end
      end
      t.body do |front_man|
        t.r do
          t.d(h(front_man.id))
          t.d(h(front_man.name))
        end
      end
    end
end

The output will include the table and tr tags, but it won't have any content. Passing the content in as a block has the same effect.

Also, for some reason, when the helper method example() is invoked from the .html.erb file, the contents of both are duplicated (my h1 followed by my table, followed by my h1 followed by my table). I believe this is caused by table_helper, because when I replace the table_for() call in example() with a regular old content_tag(), the duplication does not occur.

Readme error in calendar_for example

The first calendar_for example in the readme will output a misleading / inaccurate calendar, owing to the default value of first_day_of_week being 0 (i.e. Sunday).

I think the doc should either read:
<%= t.head('sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat') %>

Or show the first_day_of_week symbol being passed:
<% calendar_for(@tasks, :first_day_of_week => 1) %>

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.