Skip to content

Instantly share code, notes, and snippets.

resources :users do
put :approve, :on => :member
get :showPhoneNumber
end
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
return false;
});
$(function() {
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
$( "#dialog:ui-dialog" ).dialog( "destroy" );
// Don't work
$( "#message_number_false" ).click(
function() {
$( "#call_back_text" ).show(100);
});
// Don't work
$( "#message_number_true" ).click(
function() {
$( "#call_back_text" ).hide(100);
$('.submittable').live('change', function() {
$(this).parents('form:first').submit();
return false;
});
- for asset in @building.assets
.widget
.file_icon
%img{:src => "/images/pdf_logo.png", :width => "45", :height => "45"}
.file_info
%h5 Bauplan.pdf
!!!
%html
%head
%title Royal7
= stylesheet_link_tag :all
= javascript_include_tag :defaults
= csrf_meta_tag
%body
= if user_signed_in?
.head
Scenario: Edit Company Name # features/user_edit.feature:6
Given I am signed up and signed in with "test@example.com" # features/step_definitions/session_steps.rb:12
And I am on the home page # features/step_definitions/web_steps.rb:44
When I follow "My Info" # features/step_definitions/web_steps.rb:56
And I fill in "user[company_name]" with "Royal Snoker Casino" # features/step_definitions/web_steps.rb:60
And I fill in "user[current_password]" with "secret" # features/step_definitions/web_steps.rb:60
And I press "Update" # features/step_definitions/web_steps.rb:52
undefined method `node_name' for nil:NilClass (NoMethodError)
./features/step_definitions/web_steps.rb:53:in `/^(?:|I )press "([^"]*)"$/'
features/user_edit.feature:12:in `And I press "Update"'
def building_update(building)
BuildingNotification.where(:building_id => building.id).each do |bn|
mail :to => bn.user.email,:subject => "Update for #{building.project_title}"
end
end
<div class="field">
<%= f.radio_button :number, "0" %>
<%= f.label :number, "Call Back" %><br />
<%= f.radio_button :number, "1" %>
<%= f.label :number, "Send E-Mail" %>
</div>
class BuildingsController < ApplicationController
before_filter :authenticate_user!, :except => [:new, :edit, :create, :update, :destroy]
before_filter :authenticate_admin!
# GET /buildings
# GET /buildings.xml
def index
@buildings = Building.all