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
<% form_tag @maps, :method => 'get' do %> | |
<label>Campaign Id:</label> | |
<%= select_tag "campaign_id", options_from_collection_for_select(@campaign, "id", "title" ,prompt="all") %> | |
<label for="from">From</label> | |
<%= text_field_tag :from, @from.strftime("%d-%m-%Y") || Date.today.beginning_of_month.strftime("%d-%m-%Y")%> | |
<label for="to">to</label> | |
<%= text_field_tag :to, @to.strftime("%d-%m-%Y") || Date.today.end_of_month.strftime("%d-%m-%Y") %> | |
<%= submit_tag "Update" %> |
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
raghukul107:Ad-Link Define$ rake db:migrate | |
(in /Users/Define/Parashar/Ad-Link) | |
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. | |
rake aborted! | |
dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: libmysqlclient.16.dylib | |
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle | |
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle | |
(See full trace by running task with --trace) | |
raghukul107:Ad-Link Define$ rake db:migrate --trace |
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
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Execute db:migrate | |
rake aborted! | |
uninitialized constant MysqlCompat::MysqlRes | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant' | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:9:in `define_all_hashes_method!' | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:68:in `mysql_connection' |
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
C:\Ruby192\Test1>bundle install | |
Fetching source index for http://rubygems.org/ | |
Using rake (0.8.7) | |
Using abstract (1.0.0) | |
Using activesupport (3.0.0) | |
Using builder (2.1.2) | |
Using i18n (0.4.2) | |
Using activemodel (3.0.0) | |
Using erubis (2.6.6) | |
Using rack (1.2.1) |
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
app/controllers/clubs_controller.rb:75:in `link' | |
app/controllers/clubs_controller.rb:76:in `link' | |
actionpack (3.0.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action' | |
actionpack (3.0.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action' | |
actionpack (3.0.0) lib/abstract_controller/base.rb:150:in `process_action' | |
actionpack (3.0.0) lib/action_controller/metal/rendering.rb:11:in `process_action' | |
actionpack (3.0.0) lib/abstract_controller/callbacks.rb:18:in `process_action' | |
activesupport (3.0.0) lib/active_support/callbacks.rb:435:in `_run__1113354289__process_action__743793607__callbacks' | |
activesupport (3.0.0) lib/active_support/callbacks.rb:409:in `send' | |
activesupport (3.0.0) lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks' |
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
Controller code.. | |
def add | |
puts params[:srno] | |
edatabase = Club.find(:first, :conditions => [ "srno = ?", params[:srno] ]); | |
puts edatabase | |
if edatabase | |
edatabase.srno = params[:srno] | |
edatabase.fbuid = params[:fbuid] | |
edatabase.cbname = params[:cbname] |
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
controller code:- | |
def add | |
print params[:id] | |
@club = Club.find_by_fbuid(params[:id]) | |
edatabase = Club.find(:first, :conditions => [ "fbuid = ?", params[:fbuid] ]); | |
if edatabase | |
edatabase.fbuid = params[:fbuid] | |
edatabase.cbname params[:cbname] | |
edatabase.str_name = params[:str_name] |
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
class Club < ActiveRecord::Base | |
def self.search(search) | |
print search | |
search_condition = "%" + search + "%" | |
find(:all, :conditions => ['fbuid LIKE ? OR fbname LIKE ?', search_condition, search_condition]) | |
end | |
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
controller code | |
def destroy | |
puts params[:id] | |
@club=Club.find_by_fbuid(params[:id]) | |
puts @club | |
@club.destroy.inspect | |
redirect_to :action => 'list' | |
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
def destroy | |
@club_delete=Club.find(params[:id]).inspect | |
@club_delete.destroy | |
redirect_to :action => 'list' |
NewerOlder