This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
.selector | |
@media screen and (min-width: 1024px) | |
&.-of-5 | |
width: 20% | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% semantic_form_for @user do |form| %> | |
<%= form.inputs :title, :body, :section_id, :created_at %> | |
<%= form.buttons :commit %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
speechless:~/dev $ rails formtastic_test | |
create | |
create app/controllers | |
create app/helpers | |
... trimmed by JF | |
speechless:~/dev $ cd formtastic_test/ | |
speechless:~/dev/formtastic_test $ ./script/plugin install git://github.com/justinfrench/formtastic.git | |
Initialized empty Git repository in .git/ | |
warning: no common commits | |
remote: Counting objects: 26, done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. add this to formtastic_spec.rb inside the ":as => :select" describe block | |
it 'should have one option with a "selected" attribute' do | |
output_buffer.should have_tag('form li select option[@selected]', :count => 2) # the 2 is intentional | |
end | |
# 2. run the specs | |
expected | |
<form class="formtastic post" action="/posts" method="post" id="new_post"><li class="select optional" id="post_author_id_input"><label for="post_author_id">Author</label><select name="post[author_id]" id="post_author_id"><option value="37">Fred Smith</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://rpheath.com/posts/409-rails-time-date-formatting-with-lambda | |
Time::DATE_FORMATS.merge!( | |
:friendly => lambda { |time| | |
if time.year == Time.now.year | |
time.strftime "%b #{time.day.ordinalize}" | |
else | |
time.strftime "%b #{time.day.ordinalize}, %Y" | |
end | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameters: { | |
"commit"=>"Create Post", | |
"post"=>{ | |
"thing_attributes"=>{ | |
"name"=>"sdfgsdf", | |
"about"=>"sdfg" | |
}, | |
"body"=>"sdfgsdg", | |
"title"=>"sdfgsdg", | |
"published"=>"0"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# renders a post[author_attributes][login] | |
form_for(@new_post) do |post| | |
post.fields_for(:author) do |author| | |
concat(author.text_field(:login)) | |
end | |
end | |
# renders a post[author][login] | |
form_for(@new_post) do |post| | |
post.fields_for(@new_post.author) do |author| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails CMS alternatives | |
====================== | |
Note: project activity was checked on 11/26/09. | |
Active projects: | |
--------------- | |
adva-cms | |
repo: http://github.com/svenfuchs/adva_cms/ | |
site: http://adva-cms.org/ | |
Last update: 11/24/09 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"You will receive a confimation email with in the business day.In case you haven't received Please call 13 6954 (13 myki) with your myki reference number ." | |
* spelling error "confimation" | |
* missing space "day.In" | |
* missing words and not need for capitalisation "haven't received Please call" | |
* missing the reference number "with your myki reference number ." | |
That was after filling in the feedback form 3 times and spending 30 mins on the phone with a nice person who couldn't actually help me. |
OlderNewer