This file contains hidden or 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
| <%= form.label :name %><br /> | |
| <%= form.text_field :name %><br /> | |
| <br /> | |
| <%= form.label :website %><br /> | |
| <%= form.text_field :website %><br /> | |
| <br /> | |
| <%= form.label :bio %><br /> | |
| <%= form.text_area :bio %><br /> | |
| <br /> | |
| <%= form.label :email %><br /> |
This file contains hidden or 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
| Then /^I should be logged in$/ do | |
| session = UserSession.find | |
| return true if session | |
| end | |
| Given /^I am not logged in$/ do | |
| session = UserSession.find | |
| return true if !session | |
| end |
This file contains hidden or 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
| jgn@jgn ~/sites/investapp/investapp.com[master*]$ git status | |
| # On branch master | |
| # Your branch is ahead of 'origin/master' by 3 commits. | |
| # | |
| # Changed but not updated: | |
| # (use "git add/rm <file>..." to update what will be committed) | |
| # (use "git checkout -- <file>..." to discard changes in working directory) | |
| # | |
| # modified: README.textile | |
| # modified: app/controllers/application.rb |
This file contains hidden or 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
| require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
| describe Participation::ArticlesController do | |
| before(:each) do | |
| activate_authlogic | |
| @current_user = Factory.create(:user) | |
| @article = Factory.build(:article) | |
| @new_article = Factory.stub(:article) | |
| end |
This file contains hidden or 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
| class Participation::ArticlesController < Participation::ApplicationController | |
| def new | |
| @article || @article = Article.new | |
| end | |
| def create | |
| @article = Article.new(params[:article]) | |
| respond_to do |format| | |
| if @article.save |
This file contains hidden or 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
| <div id="login_fields"> | |
| <h3> | |
| Login | |
| </h3> | |
| <form action="/login" method="post" accept-charset="utf-8" id="login_form" name="login_form"> | |
| <input type="hidden" name="site_id" value="58519132" id="site_id"> <input type="hidden" name="_method" value="PUT"> | |
| <div class="formRow"> | |
| <label>Login: <input type="text" name="login" value="" id="login"></label> | |
| </div> | |
| <div class="formRow"> |
This file contains hidden or 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
| Structure | |
| ========= | |
| Form | |
| Fields | |
| Elements | |
| Label (optional but most common) | |
| Element | |
| Label (optional in case of a a checkbox or radio) | |
| Input Checkbox/Radio |
This file contains hidden or 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
| <%= form_for(@user, :action => "/users/#{@user.login}") %> | |
| <%= hidden_field :value => "DELETE", :name => "_method" %> | |
| <div class="actions"> | |
| <input type="image" name="submit" src="/images/btn-delete_user.png" id="deleteUser" /> | |
| or <%= link_to "cancel", resource(:users) %> | |
| </div> | |
| <% end =%> |
This file contains hidden or 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
| var app = $.sammy(function() { with(this) { | |
| get('#/repondre/:comment_id', function() { with(this) { | |
| partial('/templates/comments/new.html.erb', {parent_id: params['comment_id']}, function(content){ | |
| $("#comment_"+params['comment_id']).append(content); | |
| }); | |
| }}); | |
| }}); |
This file contains hidden or 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
| var cont = $(jetpack.tabs.focused.contentDocument).find("body"); | |
| // Loading the default active corners template | |
| $.ajax({ | |
| url: "http://test.jeromegn.is-a-geek.com/widget/base", | |
| type: "GET", | |
| success: function(data, textStatus) { | |
| cont.append(data); | |
| }, |
OlderNewer