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
| module ActionView | |
| module Helpers | |
| class InstanceTag | |
| def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0") | |
| options = options.stringify_keys | |
| options["type"] = "checkbox" | |
| options["value"] = checked_value | |
| if options.has_key?("checked") | |
| cv = options.delete "checked" | |
| checked = cv == true || cv == "checked" |
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
| From 8300f7a40465724f0ae19097a981f6c8d593bb61 Mon Sep 17 00:00:00 2001 | |
| From: mrb <mmbernstein@clinic-it.com> | |
| Date: Wed, 17 Dec 2008 18:16:55 -0500 | |
| Subject: [PATCH] added ignore_hidden_field option to check_box tag | |
| --- | |
| actionpack/lib/action_view/helpers/form_helper.rb | 29 ++++++++++++-------- | |
| 1 files changed, 17 insertions(+), 12 deletions(-) | |
| diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.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
| @LOOKUP = {} | |
| ('A'..'GZ').each_with_index do |value, index| | |
| @LOOKUP[value] = index | |
| 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
| .header | |
| ="This text is in the header" | |
| .body | |
| ="This text is in the body" | |
| %b="This text is bold" | |
| %table | |
| %tr | |
| %td="This is a table" | |
| %td="Table me sonnnn" |
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
| ?> "dude@dude.com".gsub(/\@/,'@\\') | |
| => "dude@\\dude.com" | |
| >> puts _ | |
| dude@\dude.com | |
| => nil |
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
| $(document).ready(function(){ | |
| var beenShown = 0; | |
| $(".column").click(function(event){ | |
| // for "click here tip" | |
| beenShown = 1; | |
| $("#clickme").slideUp(); | |
| $(this).toggleClass("selected"); | |
| $(".column").not(this).removeClass("selected"); |
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
| --- | |
| Navigation: | |
| --- | |
| 1: | |
| title: Web Based. | |
| children: | |
| --- | |
| 1: | |
| title: Child One | |
| native: Here is the child One info. |
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 Favorite = { | |
| client_name: "", | |
| client_id: "", | |
| user_id: "", | |
| add_or_remove: "", | |
| getID: function(params){ | |
| this.client_name = params.attr("client_name"); | |
| this.client_id = params.attr("client_id"); | |
| this.user_id = params.attr("user_id"); |
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 Favorite = { | |
| client_name: "", | |
| client_id: "", | |
| user_id: "", | |
| add_or_remove: "", | |
| getID: function(params){ | |
| this.client_name = params.attr("client_name"); | |
| this.client_id = params.attr("client_id"); | |
| this.user_id = params.attr("user_id"); |
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 Favorite = { | |
| postAction: function(params){ | |
| client_name: params.attr("client_name"); | |
| client_id: params.attr("client_id"); | |
| user_id: params.attr("user_id"); | |
| add_or_remove: params.attr("add_or_remove"); | |
| $.post('/users/'+this.user_id+'/'+this.add_or_remove+'_favorites.js', | |
| { | |
| id: this.user_id, |