No longer maintained. Use the following instead: github.com/watu/table_builder
p8 / table_builder Goto Github PK
View Code? Open in Web Editor NEWRails builder for creating tables and calendars inspired by ActionView's FormBuilder.
Rails builder for creating tables and calendars inspired by ActionView's FormBuilder.
No longer maintained. Use the following instead: github.com/watu/table_builder
13 tests fail with the following message:
NoMethodError: undefined method `assert_dom_equal'
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
So, as you can read, TableBuilder is throwing an error because it expected an Array, but found an... Array. Not sure why this is throwing an exception. Any wisdom would be appreciated.
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!
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?
This fork does though: git://github.com/jchunky/table_builder.git
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
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.
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) %>
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.