[Rails] Do you want a job with meaning?

2017-09-27 Thread me
Hello!

Survival International is searching for a software crafter who follows best 
practices and is able to write clean and maintainable code.
We are a supportive small team (3 devs, 1 sysadmin), tech agnostic, 
non-corporate and have no clients, so we impose our own deadlines and make 
our own decisions on the direction of our projects

Our non-profit is a global organisation that fights for the rights of 
tribal peoples all around the world.
So rather than building another betting site, corporate app, or banking 
service, your work will be actually making a difference and having a huge 
impact in the lives of these people.

If all this sound good to you and you are based in London, UK, you can 
learn more about it here:
https://survival-international.breezy.hr/

The deadline is the 30 of September, so you still have some time left!

All the best,
Maël

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/70fea90b-a4a2-48f5-8d99-74dc29786fc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: rails 4 link_to post method

2014-03-29 Thread Me
Route,  post 'payments/:list_item_id', to: 'payments#buy', :as => :buy

On Saturday, March 29, 2014 12:02:45 PM UTC-5, Me wrote:
>
> I have a rails 4 app that has a link_to with a post method but I keep 
> getting:
>
> No route matches [GET] "/payments/136330"
>
> <%= link_to("Buy Now", buy_path(list_item), :method => :post) %>
>
> Ideas??
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/21350ab3-a33d-41cb-9061-e103db36b31b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] rails 4 link_to post method

2014-03-29 Thread Me
I have a rails 4 app that has a link_to with a post method but I keep 
getting:

No route matches [GET] "/payments/136330"

<%= link_to("Buy Now", buy_path(list_item), :method => :post) %>

Ideas??

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/c0f40a7c-0fb7-4d40-9d12-51cd8bb0cdd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: how named routes work ?

2013-04-16 Thread me
The route specified as:
map.home '/', :controller => '/sessions', :action => 'index'

means whenever you visit "http://localhost:3000/";; it would redirect to 
"/sessions" controller + "/index" action



On Tuesday, April 16, 2013 12:30:35 AM UTC-7, Ruby-Forum.com User wrote:
>
> I've been analysing a rails project where it has routes.rb like 
>
> routes.rb : 
>
>   map.connect '/sessions/remote_create', :controller => '/sessions', 
> :action => 'remote_create' 
>   map.resources :users, :sessions, :unfiled_documents, :appointments, 
> :searches, :pat_ratio 
>   map.login '/login', :controller => '/sessions', :action => 'new' 
>   map.logout '/logout', :controller => '/sessions', :action => 'destroy' 
>   map.home '/', :controller => '/sessions', :action => 'index' 
>
>
> What I dont understand is whenever I open the app in my browser it 
> automatically goes to "/session/new" -- as default page 
>
> Can anybody explain how it is working ? I've heard we need to use 
> map.root for default page. 
>
> -- 
> Posted via http://www.ruby-forum.com/. 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/hg8n_z3aWmoJ.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] rails 3.2 check_box_tag jquery submit as get

2012-10-06 Thread Me
This jquery ajax call always submits as a get even though it is  a put 
request.  Ideas why?

jQuery ->
$(".activity_status").click ->
  #alert person_id
  $.ajax ->
type: 'PUT'
url: "/answers/"
data: "person[id]="+person_id

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/vBN6A5Rh7V4J.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] rails 3.2 question/answer with a through table

2012-10-05 Thread Me
I have a person has many questions through person_questions.  I have an 
extra column in the join table for the answer.  The section below works for 
a new submit but when I edit I get 3 each with the first 2 of each selected 
tand the third not so I get 6 check boxes some selected some not.  Is there 
a way to get this  to work properly os just the questions in the db show up 
once each with the appropriate ones checked?
The questions are in the db.


Questions: 
<% Question.all.each do |question| %>
  <%= f.fields_for :person_questions do |pregunta| %>
<%= render 'questions/question_type', :pregunta => pregunta, 
:question => question, :f => f %>
  <% end %>
<% end %>

Partial:


  <%= pregunta.label question.name, (question.label_text unless 
question.label_text.nil?), :class => 'control-label' %>
  
<% if question.data_type == 'select' %>
  <%= pregunta.send(question.data_type, :answer, 
question.to_select,:class => "#{question.data_type}")  %>
  <%= pregunta.hidden_field :question_id, :value => question.id , 
:class => "#{question.data_type}" %>
<% else %>
  <%= pregunta.send(question.data_type, :answer, :class => 
"#{question.data_type}" ) %>
  <%= pregunta.hidden_field :question_id, :value => question.id , 
:class => "#{question.data_type}" %>
<% end %>
  


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/oHY14fbSOX0J.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] rails 3.2 nested form names not correct

2012-09-28 Thread Me
I have a person has many questions model,  I have accepts_nested_Attributes 
set up properly.  the question from the db show up, but the index is not 
incrementing:

<%= f.fields_for :person_questions do |pregunta| %>
  Questions: 
  <% Question.all.each do |question| %>
<%= render 'questions/question_type', :pregunta => pregunta, 
:question => question, :f => f %>
  <% end %>
<% end %>

  <%= f.label :date_of_problema, :class => 'control-label' %>
  
<%= f.datepicker :date_of_problema, :class => 'date_select' %>
  



partial:


  <%= pregunta.label question.name, (question.label_text unless 
question.label_text.nil?), :class => 'control-label' %>
  
<%= pregunta.send(question.data_type, :option_selected ) %>
<%= pregunta.hidden_field :question_id, :value => question.id , :class 
=> "#{question.data_type}" %>
  


Is there a way to get the attribute names to be correct?

The questions come from the db.
chrome inspector:



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/lYzGc04VpAwJ.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: f.send in form?

2012-09-28 Thread Me
Been a while, I had the closing bracket in the wrong spot:
send needs all the params, it was erroring on , if i put the closing 
bracket right after the data_type or name
<%= person_question.send(question.data_type.to_sym, question.name, :class 
=> 'text_field') %>

On Monday, July 30, 2012 5:01:42 PM UTC-5, Me wrote:
>
> Can you do f.send in a form?  I have questions and the data type stored in 
> a db.
>
> <% Question.all.each do |question| %>
>   
> <%= f.send(:label, question.name), :class => 'control-label' 
> %>
> 
>   <%= f.send(question.data_type.to_sym, :question, :name) %> - 
> <%= ' allergic to shellfish?' %>
> 
>   
> 
> <% end %>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/gR9GK0yFNKEJ.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] f.send in form?

2012-07-30 Thread Me
Can you do f.send in a form?  I have questions and the data type stored in 
a db.

<% Question.all.each do |question| %>
  
<%= f.send(:label, question.name), :class => 'control-label' %>

  <%= f.send(question.data_type.to_sym, :question, :name) %> - 
<%= ' allergic to shellfish?' %>

  

<% end %>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/6K79gq2KHPYJ.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Create a select with HABM

2012-03-05 Thread Eddie Lau (http://36613.me)
Do u mean double select ?
You have two select drop down, and u want the second one contains only the 
users which belongs to the selected project in the first select drop down ?


3dd13 
developer
http://3dd13.me

On 6 Mar, 2012, at 7:29 AM, Felipe Pieretti Umpierre  
wrote:

> Hello Colin, thank you for Ur attention.
> 
> I have a model Project, in my projects I can create items, in this 
> project I can Select various user, that will be available in my items to 
> distribute that users that I select to make part of my project.
> 
> But when I try to make a select of all users that are in this project, I 
> can't because I don't know very well rails yet, and don't know if have 
> something already done or I will have to improvise.
> 
> Thank you again
> 
> -- 
> Posted via http://www.ruby-forum.com/.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails ujs, multiple ajax requests

2011-10-03 Thread Me
Is there a way if you have multiple say products(example) to comment with 
ajax on each one inline?  I cannot seem to pass anything other than the 
id.   products have may comments

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/c4wjbqwcWL0J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails 3.1 authentication

2011-09-19 Thread Me
I have the rails 3.1 authentication set up, how do I get it to make sure I 
authenticate system wide?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/tviS_m2_1p4J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] heroku and beanstalk server

2011-09-14 Thread Me
Does anyone know how to get the beanstalk server installed on the cedar 
stack on heroku?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/52x17knd8VkJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Rails 3.1 and mongo_mapper

2011-08-27 Thread Me
I have a new app using rails 3.1 and mongo_mapper, I cannot seem to get past 
this when doing bundler:

I have installed activesupport 3.0.0 with no avail.

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
mongo_mapper depends on
  activesupport (~> 3.0.0)

rails (= 3.1.0.rc5) depends on
  activesupport (3.1.0.rc5)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/H7A-iifLvQ0J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] cancan include issue

2011-06-01 Thread Me
I have a Rails 2.3.4 app that uses cancan, but when I try to go to the index 
page I get:
I see the gem when I do a gem list, ideas?

uninitialized constant Authorization::ControllerMethods::CanCan


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/MzZuanVJNVMxRThK.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails 2.3.5 nested attributes problema

2011-05-09 Thread Me
The params sent to the controller are not nesting correctly as seen below.

<% fields_for "discount_code[new_discount][]
", task do |form| %>
Tour Type ID: <%= form.text_field :tour_type_id %>
Price: <%= form.text_field :price_number %>
Days: <%= form.text_field :days %>
<% end %>

I would expect this to come into the controller looking like

parameters : {"discount_code" => 
 {"new_discount" =>  [
{"tour_type_id" => '8', "price_number" => '8.00', "days" => 
'-1'},
{"tour_type_id" => '7', "price_number" => '22.00', "days" => 
'3'}
  ]
}

Instead - it's coming in like this:

Parameters : {:discount_code => 
   {"new_discount_attributes" =>[ 
   {"tour_type_id"=>"7"}, 
{"day"=>"-1", "tour_type_id"=>"8"}, 
{"day"=>"3", "price_number"=>"22.00"}, 
{"price_number"=>"8.00"}],

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] mobile backend question

2011-05-06 Thread Me
I am thinking of doing a iphone all and android app.  What is the best way 
to handle on the backend if you have say user has _many :blah?  Would you 
authenticate on the front end or send other info to the backend to associate 
the user on the phone with items on the backend?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Routin Error

2011-05-03 Thread Me
Might try a symbol for admin.  Also is your controller is 
Admin::TransfersController?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Database performance for polymorphic associations under high load

2011-05-02 Thread Me
I would stay away from polymorphic as there is no way to enforce DB FK 
relationships.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] gdata gem authentication issue

2011-05-02 Thread Me
I do:

client = GData::Client::DocList.new
client.clientlogin('chabg...@gmail.com', 'password')

I can do client.inspect and see the token.  When I do:

feed = 
client.get('http://gdata.youtube.com/feeds/api/users/default/uploads').to_xml

I get token not found error:

HEAD>
Token invalid


Token invalid
Error 401



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: What am I doing wrong in this nested form?

2011-04-07 Thread Me
http://railscasts.com/episodes/16-virtual-attributes

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: AR inner join with foreign key .. cannot get it right ...

2011-04-06 Thread Me
Is there any reason why you do not use the standard FK names so you do not 
have to tell it what they are?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: how to solve ActiveRecord::ConnectionNotEstablished

2011-03-25 Thread Me
Is your database.yml file set up?  You have created the DB and ran 
migrations?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] jquery/prototype. element.tagName undefined

2011-03-24 Thread Me
Has anyone had this issue with using prototype and jquery doing a 
page.replace_html 'element' :partial 'blah'

RJS error:

element.tagName undefined

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Ruby on Rails developer

2011-03-24 Thread Me
Is this normal US working hours?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] jquery authenticity_token issue

2011-03-24 Thread Me
I am using the Jquery FullCalendar in an app.  When I click on a day I post 
an ajax request.  I keep getting the 422 response as the authenticity_token 
is invalid.  I put the skip_before_filter to not require it but I keep 
getting the 422 error.

skip_before_filter :verify_authenticity_token

I found a post on how to send the token along but that  has not fixed the 
issue. 

dayClick: function(event, jsEvent, view){
  jQuery.ajax({
type: 'post',
url: "/days/new",
dataType: 'script'
});
  
  },

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Re: Rails 2.0.1 RC2 - activerecord-oracle-adapter not found

2011-03-13 Thread Sanjeev Me
Bryan Crossland wrote in post #987228:
> On Sun, Mar 13, 2011 at 2:54 PM, Frederick Cheung <
> frederick.che...@gmail.com> wrote:
>
>>
>> Fred
>>
>
> Agreed. The gem you are looking for is really old and has been replaced
> by activerecord-oracle_enhanced-adapter gem.
>
> B.**

Figured out the issue. Changed oracle to oracle_enhanced in database.yml 
file and was ok after that.

Regards,
Sanjeev.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Rails 2.0.1 RC2 - activerecord-oracle-adapter not found

2011-03-13 Thread Sanjeev Me
Frederick Cheung wrote in post #987224:
> On Mar 13, 7:24pm, Sanjeev Me  wrote:
>> Can anyone please provide me activerecord-oracle-adapter.gem file. I no
>> longer find it i the rubysource website. Also im doing this install from
>> local respository versus using gem source repository over internet as I
>> am behind a firewall on the linux server
>>
> I think these days you want the activerecord-oracle_enhanced-adapter
> gem
>
> Fred

Fred - I have installed that but I am trying to create sample
application per
http://www.oracle.com/technetwork/articles/haefel-oracle-ruby-089811.html
and created comics app however when I access it giving errors saying it
needs activerecord-oracle-adapter.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Rails 2.0.1 RC2 - activerecord-oracle-adapter not found

2011-03-13 Thread Sanjeev Me
Can anyone please provide me activerecord-oracle-adapter.gem file. I no
longer find it i the rubysource website. Also im doing this install from 
local respository versus using gem source repository over internet as I 
am behind a firewall on the linux server

Regards

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] JS data to rails view helper

2011-03-09 Thread Me


On Wednesday, March 9, 2011 9:57:02 PM UTC-6, jim wrote:
>
>
>
> On Thu, Mar 10, 2011 at 11:39 AM, Me  wrote:
>
>> Ok, is there another way to get this to work without going back to the 
>> server to just get a value from the select?
>>
>>
> please don't top post.
>
> what are you trying to achieve? give use some code snippets.
>

  Here is the partial:
  
  <% fields_for_exclusion_date(excluded_date) do |excluded_date_attr| %>
<%= excluded_date_attr.label :exclusion_date,'Excluded Date:' -%>
  <%= excluded_date_attr.calendar_date_select :excluded_date, :class => 
"valid_from_date-input text-input",:value => value %>
  <%= link_to_function "remove", "$(this).up('.form_field').remove()" %>
<% end %>

 
Here is the view:
<%= select_tag :discout_code, options_for_select(@discount_
codes)%><%= add_exclusion_date_link('Add Existing', Select value goes here ) 
%>

>  
>
>> On Wednesday, March 9, 2011 9:20:20 PM UTC-6, jim wrote:
>>>
>>>
>>>
>>> On Thu, Mar 10, 2011 at 9:43 AM, Me  wrote:
>>>
>>>> I have a view helper like ryan bates complex forms task helper, rails 
>>>> 2.2.2.  Anyway is there a way to send the value selected in a select menu 
>>>> to 
>>>> the helper?  I am trying to do stuff without going back to the server. 
>>>>
>>>>
>>> if you're trying to use the value selected by the user in your helper 
>>> through js, you can't.
>>> js is client side, helpers are server side.
>>>  
>>>
>>>>  <%= select_tag :discout_code, options_for_select(@discount_codes)%><%= 
>>>> add_exclusion_date_link('Add Existing', JS ) %>
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To post to this group, send email to rubyo...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> rubyonra...@googlegroups.com.
>>>>
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>
>>>
>>>
>>>
>>> -- 
>>> -
>>> visit my blog at http://jimlabs.heroku.com
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> -- 
> -
> visit my blog at http://jimlabs.heroku.com
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] JS data to rails view helper

2011-03-09 Thread Me


On Wednesday, March 9, 2011 9:55:34 PM UTC-6, jim wrote:
>
> Not sure where to put this but here is the code again:
>

<%= select_tag :discount_code, options_for_select(@discount_
codes)%><%= add_exclusion_date_link('Add Existing', Select Value goes here ) 
%>
 

>
> On Thu, Mar 10, 2011 at 11:39 AM, Me  wrote:
>
>> Ok, is there another way to get this to work without going back to the 
>> server to just get a value from the select?
>>
>> On Wednesday, March 9, 2011 9:20:20 PM UTC-6, jim wrote:
>>>
>>>
>>>
>>> On Thu, Mar 10, 2011 at 9:43 AM, Me  wrote:
>>>
>>>> I have a view helper like ryan bates complex forms task helper, rails 
>>>> 2.2.2.  Anyway is there a way to send the value selected in a select menu 
>>>> to 
>>>> the helper?  I am trying to do stuff without going back to the server. 
>>>>
>>>>
>>> if you're trying to use the value selected by the user in your helper 
>>> through js, you can't.
>>> js is client side, helpers are server side.
>>>  
>>>
>>>>  <%= select_tag :discout_code, options_for_select(@discount_codes)%><%= 
>>>> add_exclusion_date_link('Add Existing', JS ) %>
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To post to this group, send email to rubyo...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> rubyonra...@googlegroups.com.
>>>>
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>
>>>
>>>
>>>
>>> -- 
>>> -
>>> visit my blog at http://jimlabs.heroku.com
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> -- 
> -
> visit my blog at http://jimlabs.heroku.com
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] JS data to rails view helper

2011-03-09 Thread Me
Ok, is there another way to get this to work without going back to the 
server to just get a value from the select?

On Wednesday, March 9, 2011 9:20:20 PM UTC-6, jim wrote:
>
>
>
> On Thu, Mar 10, 2011 at 9:43 AM, Me  wrote:
>
>> I have a view helper like ryan bates complex forms task helper, rails 
>> 2.2.2.  Anyway is there a way to send the value selected in a select menu to 
>> the helper?  I am trying to do stuff without going back to the server. 
>>
>>
> if you're trying to use the value selected by the user in your helper 
> through js, you can't.
> js is client side, helpers are server side.
>  
>
>> <%= select_tag :discout_code, options_for_select(@discount_codes)%><%= 
>> add_exclusion_date_link('Add Existing', JS ) %>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> -- 
> -
> visit my blog at http://jimlabs.heroku.com
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] JS data to rails view helper

2011-03-09 Thread Me
Ya I have seen that.  How does that apply to what I am doing?

On Wednesday, March 9, 2011 8:42:22 PM UTC-6, radhames brito wrote:
>
> http://railscasts.com/episodes/88-dynamic-select-menus 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] JS data to rails view helper

2011-03-09 Thread Me
I have a view helper like ryan bates complex forms task helper, rails 
2.2.2.  Anyway is there a way to send the value selected in a select menu to 
the helper?  I am trying to do stuff without going back to the server. 

<%= select_tag :discout_code, options_for_select(@discount_codes)%><%= 
add_exclusion_date_link('Add Existing', JS ) %>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] validation order firing

2011-03-08 Thread Me
OK, cool.  Thanks.

On Tuesday, March 8, 2011 9:40:30 PM UTC-6, jim wrote:
>
>
>
> On Wed, Mar 9, 2011 at 11:36 AM, Me  wrote:
>
>> But is the validates_presence_of supposed to catch that first?
>>
>>
> ah ok, now i see what you mean. 
>
> validations don't work that way. all validations are run even when the 
> previous
> validations fail.  that's why you need to add :if and :except arguments so 
> that
> some validations are run only when some conditions are met.
>  
>
>> On Tuesday, March 8, 2011 9:33:40 PM UTC-6, jim wrote:
>>>
>>>
>>>
>>> On Wed, Mar 9, 2011 at 10:34 AM, Me  wrote:
>>>
>>>> Ok, well the value in the validates_each is giving me nil, not sure 
>>>> why.  Error is:
>>>>
>>>> The error occurred while evaluating nil.>=):
>>>>
>>>> validates_presence_of :code
>>>> validates_uniqueness_of :code
>>>> validates_presence_of :valid_from_date, :expiry_date
>>>> validates_each :expiry_date do |record, attribute, value|
>>>>   record.errors.add(:expiry_date, 'must be after or the same as valid 
>>>> from date') unless value >= record.valid_from_date
>>>> end
>>>>
>>>>  
>>> the error says that value is nil so check first if it's nil or not.
>>>
>>> validates_each :expiry_date do |record, attribute, value|
>>>   record.errors.add(:expiry_date, 'must be after or the same as valid 
>>> from date') if value && !(value >= record.valid_from_date)
>>> end
>>>  
>>>
>>>>  On Tuesday, March 8, 2011 8:28:21 PM UTC-6, jim wrote:
>>>>
>>>>>
>>>>>
>>>>>  On Wed, Mar 9, 2011 at 10:19 AM, Me  wrote:
>>>>>
>>>>>> If you have:
>>>>>>
>>>>>> validates_presence_of
>>>>>> validates_uniqueness_of 
>>>>>> ...
>>>>>>
>>>>>> validates_each
>>>>>>
>>>>>>
>>>>>> What fires in what order?
>>>>>>
>>>>>
>>>>> the way you order them in your model file. so validates_presence_of 
>>>>> goes first,
>>>>> uniqueness next then validates_each.
>>>>>  
>>>>>
>>>>>>  -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Ruby on Rails: Talk" group.
>>>>>> To post to this group, send email to ruby...@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to 
>>>>>> rubyo...@googlegroups.com.
>>>>>>
>>>>>> For more options, visit this group at 
>>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> -
>>>>> visit my blog at http://jimlabs.heroku.com
>>>>>
>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To post to this group, send email to rubyo...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> rubyonra...@googlegroups.com.
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>
>>>
>>>
>>>
>>> -- 
>>> -
>>> visit my blog at http://jimlabs.heroku.com
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> -- 
> -
> visit my blog at http://jimlabs.heroku.com
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] validation order firing

2011-03-08 Thread Me
But is the validates_presence_of supposed to catch that first?

On Tuesday, March 8, 2011 9:33:40 PM UTC-6, jim wrote:
>
>
>
> On Wed, Mar 9, 2011 at 10:34 AM, Me  wrote:
>
>> Ok, well the value in the validates_each is giving me nil, not sure why.  
>> Error is:
>>
>> The error occurred while evaluating nil.>=):
>>
>> validates_presence_of :code
>> validates_uniqueness_of :code
>> validates_presence_of :valid_from_date, :expiry_date
>> validates_each :expiry_date do |record, attribute, value|
>>   record.errors.add(:expiry_date, 'must be after or the same as valid from 
>> date') unless value >= record.valid_from_date
>> end
>>
>>
> the error says that value is nil so check first if it's nil or not.
>
> validates_each :expiry_date do |record, attribute, value|
>   record.errors.add(:expiry_date, 'must be after or the same as valid from 
> date') if value && !(value >= record.valid_from_date)
> end
>  
>
>> On Tuesday, March 8, 2011 8:28:21 PM UTC-6, jim wrote:
>>>
>>>
>>>
>>> On Wed, Mar 9, 2011 at 10:19 AM, Me  wrote:
>>>
>>>> If you have:
>>>>
>>>> validates_presence_of
>>>> validates_uniqueness_of 
>>>> ...
>>>>
>>>> validates_each
>>>>
>>>>
>>>> What fires in what order?
>>>>
>>>
>>> the way you order them in your model file. so validates_presence_of goes 
>>> first,
>>> uniqueness next then validates_each.
>>>  
>>>
>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To post to this group, send email to rubyo...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> rubyonra...@googlegroups.com.
>>>>
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>
>>>
>>>
>>>
>>> -- 
>>> -
>>> visit my blog at http://jimlabs.heroku.com
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> -- 
> -
> visit my blog at http://jimlabs.heroku.com
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] validation order firing

2011-03-08 Thread Me
Ok, well the value in the validates_each is giving me nil, not sure why.  
Error is:

The error occurred while evaluating nil.>=):

validates_presence_of :code
validates_uniqueness_of :code
validates_presence_of :valid_from_date, :expiry_date
validates_each :expiry_date do |record, attribute, value|
  record.errors.add(:expiry_date, 'must be after or the same as valid from 
date') unless value >= record.valid_from_date
end

On Tuesday, March 8, 2011 8:28:21 PM UTC-6, jim wrote:
>
>
>
> On Wed, Mar 9, 2011 at 10:19 AM, Me  wrote:
>
>> If you have:
>>
>> validates_presence_of
>> validates_uniqueness_of 
>> ...
>>
>> validates_each
>>
>>
>> What fires in what order?
>>
>
> the way you order them in your model file. so validates_presence_of goes 
> first,
> uniqueness next then validates_each.
>  
>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>
>
> -- 
> -
> visit my blog at http://jimlabs.heroku.com
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] validation order firing

2011-03-08 Thread Me
If you have:

validates_presence_of
validates_uniqueness_of 
...

validates_each


What fires in what order?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: live search.....

2011-02-27 Thread Me
The fastest way is to use the local JS local automplete, load the data up in 
the view then it will be the fastest way to do an autocomplete.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
Ok, I have a custom call in my controller to call the model method:

Controller:

def create
bad = TourType.create_type(params)

unless bad.empty?
 flash.now[:error] = "#{bad.length} Errors have occured in this form" 
 flash.now[:items] = bad 
 render :update do |page|
page[:flash].replace_html :partial => 'shared/flash_box'
  end
end
  end

Model method:

def self.create_type(params)
  bad =[]
#begin
  @tour_type = TourType.new(params[:tour_type])
=begin  
  if @tour_type.save
   render :update do |page|
 page << "Redbox.close;"
 page.call "ProtoGrowl.success", "Succesfully created 
#{@tour_type.name}"
   end
  end
  rescue ActiveRecord::MultiparameterAssignmentErrors
   if params[:tour_type][:usual_price_number].blank?
 bad << "Usual price must not be 0.00"
   end
  
   
  rescue ActiveRecord::RecordInvalid
   bad << "#{@tour_type.errors.full_messages}"
 
    end
return bad
=end  
  end


On Friday, February 25, 2011 11:47:58 PM UTC-6, Me wrote:
>
> yes
>
> On Friday, February 25, 2011 11:46:27 PM UTC-6, bacrossland wrote:
>>
>>
>>
>> On Fri, Feb 25, 2011 at 11:43 PM, Me  wrote:
>>
>>> @tour_type = TourType.new(params[:tour_type])
>>>
>>>
>> That is in your TourType model on line 72?
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
yes

On Friday, February 25, 2011 11:46:27 PM UTC-6, bacrossland wrote:
>
>
>
> On Fri, Feb 25, 2011 at 11:43 PM, Me  wrote:
>
>> @tour_type = TourType.new(params[:tour_type])
>>
>>
> That is in your TourType model on line 72?
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
@tour_type = TourType.new(params[:tour_type])

On Friday, February 25, 2011 11:33:21 PM UTC-6, bacrossland wrote:
>
> On Fri, Feb 25, 2011 at 11:23 PM, Me  wrote:
>
>> The error is from the time select that rails provides if you have 
>> validations on that.
>>
>>
> So your time select is for :usual_start_time and :usual_end_time I take it. 
> The time that is being selected, is it in a format that your database will 
> accept as valid?
>
> > /app/models/tour_type.rb:72:in `new' 
>
> Also, what is on line 72 of the model?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
t'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
 
`dispatch_unlocked'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in
 
`dispatch'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
 
`synchronize'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
 
`dispatch'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
 
`dispatch_cgi'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in
 
`dispatch'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/rails-2.2.2/lib/webrick_server.rb:103:in
 
`handle_dispatch'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/rails-2.2.2/lib/webrick_server.rb:74:in
 
`service'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/httpserver.rb:104:in
 
`service'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/httpserver.rb:65:in
 
`run'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:173:in
 
`start_thread'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:162:in
 
`start'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:162:in
 
`start_thread'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:95:in
 
`start'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:92:in
 
`each'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:92:in
 
`start'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:23:in
 
`start'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/webrick/server.rb:82:in
 
`start'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/rails-2.2.2/lib/webrick_server.rb:60:in
 
`dispatch'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/rails-2.2.2/lib/commands/servers/webrick.rb:66

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 
`gem_original_require'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 
`require'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
 
`require'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
 
`new_constants_in'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
 
`require'

/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/rails-2.2.2/lib/commands/server.rb:49

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 
`gem_original_require'

/Users/chabgood/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 
`require'
script/server:3

Rendered 
/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/templates/rescues/_trace
 
(147.1ms)
   [4;36;1mSale Columns (43.1ms) [0m[0;1mSHOW FIELDS FROM `sales` [0m
Rendered 
/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/templates/rescues/_request_and_response
 
(335.7ms)
Rendering 
/Users/chabgood/.rvm/gems/ruby-1.8.7-p330@savor_seattle/gems/actionpack-2.2.2/lib/action_controller/templates/rescues/layout.erb
 
(internal_server_error)
 

On Friday, February 25, 2011 11:17:25 PM UTC-6, bacrossland wrote:
>
> On Fri, Feb 25, 2011 at 11:05 PM, Me  wrote:
>
>> Ya I know, but I am getting this, 
>> ActiveRecord::MultiparameterAssignmentErrors (1 error(s) on assignment of 
>> multiparameter attributes): with just the TourType.new for my time select, 
>> which is totally separate error from the validations. 
>>
>
> Paste the full error output, your model, and your form from the view. The 
> error is coming because you are assigning too many, too few, and/or the 
> incorrect type of assignments that the model expects for a new record. Once 
> you show me the stuff I listed I can get a better idea of which it is.  
>  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
Ya I know, but I am getting this, 
ActiveRecord::MultiparameterAssignmentErrors (1 error(s) on assignment of 
multiparameter attributes): with just the TourType.new for my time select, 
which is totally separate error from the validations.  

On Friday, February 25, 2011 10:59:18 PM UTC-6, bacrossland wrote:
>
> You're better off handling the validations in the Model. Since these are 
> all ActiveRecord errors you are getting.
>
> If you want to validate in the controller before passing to the model you 
> have to write code that will check for each thing you are looking to 
> validate (is it there?, does it fit the format you want?, etc.) before you 
> pass it to the model. This can be a lot of code and a hassle to maintain. I 
> would highly recommend that you just add a validates_presence_of 
> :usual_price_number in your model and in your controller do something like 
> the following to start:
>
> def create
>  @tour_type = TourType.new(params[:tour_type])
>
>  respond_to do |format|
> if @tour_type.save
> flash[:success] = 'Tour was successfully created.'
> format.html {redirect_to(@tour_type)}
> format.xml  { render :xml => @tour_type, :status => :created, 
> :location => @tour_type }
>else
> format.html { render :action => "new" }
> format.xml  { render :xml => @tour_type.errors, :status => 
> :unprocessable_entity }
>end
>  end
> end
>
> You can customize the error messages for your validates_presence_of and add 
> additional validation types. See Rails documentation for more info.
>
>
> http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html
>
> B.
>
> On Fri, Feb 25, 2011 at 10:41 PM, Me  wrote:
>
>> Yes it is in the controller, I will move it when I get it working.  How do 
>> I get validations on both?
>>
>>
>> On Friday, February 25, 2011 10:32:54 PM UTC-6, bacrossland wrote:
>>
>>> Because that is the top most error. The others are ignored until that 
>>> error is fixed. 
>>>
>>> What are you trying to achieve with this error handling? It looks like 
>>> you are looking to do validation on the information that is passed in. This 
>>> code also looks like it is your controller. Is that correct?
>>>
>>> B.
>>>
>>> On Fri, Feb 25, 2011 at 10:27 PM, Me  wrote:
>>>
>>>>  It is only catching the first rescue one when I know other validations 
>>>> are failing.
>>>>
>>>>
>>>> On Friday, February 25, 2011 10:20:35 PM UTC-6, bacrossland wrote:
>>>>
>>>>>  It looks fine but you have to run it to make sure it catches what you 
>>>>> want it too. 
>>>>>
>>>>> B.
>>>>>
>>>>> On Fri, Feb 25, 2011 at 9:45 PM, Me  wrote:
>>>>>
>>>>>> So is this the correct way:
>>>>>>
>>>>>> def create
>>>>>> bad =[]
>>>>>> begin
>>>>>>
>>>>>>   @tour_type = TourType.new(params[:tour_type])
>>>>>>   if @tour_type.save
>>>>>>render :update do |page|
>>>>>>  page << "Redbox.close;"
>>>>>>  page.call "ProtoGrowl.success", "Succesfully created #{@
>>>>>> tour_type.name}"
>>>>>>end
>>>>>>   end
>>>>>>   rescue ActiveRecord::MultiparameterAssignmentErrors
>>>>>>if params[:tour_type][:usual_price_number].blank?
>>>>>>  bad << "Usual price must not be 0.00"
>>>>>>end
>>>>>>   
>>>>>>
>>>>>>   rescue ActiveRecord::RecordInvalid
>>>>>>bad << "#...@tour_type.errors.full_messages}"
>>>>>>  
>>>>>> end
>>>>>>
>>>>>> unless bad.empty?
>>>>>>  flash.now[:error] = "#{bad.length} Errors have occured in this 
>>>>>> form" 
>>>>>>  flash.now[:items] = bad 
>>>>>>  render :update do |page|
>>>>>> page[:flash].replace_html :partial => 'shared/flash_box' and 
>>>>>> return
>>>>>>   end
>>>>>> end
>>>>>>   end
>>>>>>
>>>&g

Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
Yes it is in the controller, I will move it when I get it working.  How do I 
get validations on both?

On Friday, February 25, 2011 10:32:54 PM UTC-6, bacrossland wrote:
>
> Because that is the top most error. The others are ignored until that error 
> is fixed. 
>
> What are you trying to achieve with this error handling? It looks like you 
> are looking to do validation on the information that is passed in. This code 
> also looks like it is your controller. Is that correct?
>
> B.
>
> On Fri, Feb 25, 2011 at 10:27 PM, Me  wrote:
>
>> It is only catching the first rescue one when I know other validations are 
>> failing.
>>
>>
>> On Friday, February 25, 2011 10:20:35 PM UTC-6, bacrossland wrote:
>>
>>> It looks fine but you have to run it to make sure it catches what you 
>>> want it too. 
>>>
>>> B.
>>>
>>> On Fri, Feb 25, 2011 at 9:45 PM, Me  wrote:
>>>
>>>> So is this the correct way:
>>>>
>>>> def create
>>>> bad =[]
>>>> begin
>>>>
>>>>   @tour_type = TourType.new(params[:tour_type])
>>>>   if @tour_type.save
>>>>render :update do |page|
>>>>  page << "Redbox.close;"
>>>>  page.call "ProtoGrowl.success", "Succesfully created #{@
>>>> tour_type.name}"
>>>>end
>>>>   end
>>>>   rescue ActiveRecord::MultiparameterAssignmentErrors
>>>>if params[:tour_type][:usual_price_number].blank?
>>>>  bad << "Usual price must not be 0.00"
>>>>end
>>>>   
>>>>
>>>>   rescue ActiveRecord::RecordInvalid
>>>>bad << "#...@tour_type.errors.full_messages}"
>>>>  
>>>> end
>>>>
>>>> unless bad.empty?
>>>>  flash.now[:error] = "#{bad.length} Errors have occured in this 
>>>> form" 
>>>>  flash.now[:items] = bad 
>>>>  render :update do |page|
>>>> page[:flash].replace_html :partial => 'shared/flash_box' and 
>>>> return
>>>>   end
>>>> end
>>>>   end
>>>>
>>>> On Friday, February 25, 2011 9:37:05 PM UTC-6, bacrossland wrote:
>>>>
>>>>> That is because you did not setup your error handling correctly. A 
>>>>> rescue block is done within a begin and end. You don't have that. You 
>>>>> have 
>>>>> rescues just tossed into your code. The format should look something like 
>>>>> this:
>>>>>
>>>>> begin
>>>>>   puts 10/0 #Bad code which will throw a ZeroDivisionError
>>>>> rescue ZeroDivisionError
>>>>>   puts "Stop dividing by zero or the universe will end!"
>>>>> end
>>>>>
>>>>> See the docs on error handling for more information.
>>>>>
>>>>> http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html
>>>>>
>>>>> Thanks,
>>>>> B.
>>>>>
>>>>>  On Fri, Feb 25, 2011 at 9:17 PM, Me  wrote:
>>>>>
>>>>>> I have this code below, it still gives me the error, 
>>>>>> ActiveRecord::MultiparameterAssignmentErrors.  It is not catching the 
>>>>>> rescue 
>>>>>> for some reason.  Ideas? 
>>>>>>
>>>>>> def create
>>>>>> bad =[]
>>>>>> @tour_type = TourType.new(params[:tour_type])
>>>>>> if @tour_type.save
>>>>>>  render :update do |page|
>>>>>>page << "Redbox.close;"
>>>>>>page.call "ProtoGrowl.success", "Succesfully created #{@
>>>>>> tour_type.name}"
>>>>>>  end
>>>>>> end
>>>>>> rescue ActiveRecord::MultiparameterAssignmentErrors
>>>>>>  if params[:tour_type][:usual_price_number].blank?
>>>>>>bad << "Usual price must not be 0.00"
>>>>>>  end
>>>>>> 
>>>>>> rescue ActiveRecord::RecordInvalid
>>>>>>  bad << "#...@tour_type.errors.full_messages}"
>>&g

Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
It is only catching the first rescue one when I know other validations are 
failing.

On Friday, February 25, 2011 10:20:35 PM UTC-6, bacrossland wrote:
>
> It looks fine but you have to run it to make sure it catches what you want 
> it too. 
>
> B.
>
> On Fri, Feb 25, 2011 at 9:45 PM, Me  wrote:
>
>> So is this the correct way:
>>
>> def create
>> bad =[]
>> begin
>>
>>   @tour_type = TourType.new(params[:tour_type])
>>   if @tour_type.save
>>render :update do |page|
>>  page << "Redbox.close;"
>>  page.call "ProtoGrowl.success", "Succesfully created #{@
>> tour_type.name}"
>>end
>>   end
>>   rescue ActiveRecord::MultiparameterAssignmentErrors
>>if params[:tour_type][:usual_price_number].blank?
>>  bad << "Usual price must not be 0.00"
>>end
>>   
>>
>>   rescue ActiveRecord::RecordInvalid
>>bad << "#...@tour_type.errors.full_messages}"
>>  
>> end
>>
>> unless bad.empty?
>>  flash.now[:error] = "#{bad.length} Errors have occured in this form" 
>>  flash.now[:items] = bad 
>>  render :update do |page|
>> page[:flash].replace_html :partial => 'shared/flash_box' and 
>> return
>>   end
>> end
>>   end
>>
>> On Friday, February 25, 2011 9:37:05 PM UTC-6, bacrossland wrote:
>>
>>> That is because you did not setup your error handling correctly. A rescue 
>>> block is done within a begin and end. You don't have that. You have rescues 
>>> just tossed into your code. The format should look something like this:
>>>
>>> begin
>>>   puts 10/0 #Bad code which will throw a ZeroDivisionError
>>> rescue ZeroDivisionError
>>>   puts "Stop dividing by zero or the universe will end!"
>>> end
>>>
>>> See the docs on error handling for more information.
>>>
>>> http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html
>>>
>>> Thanks,
>>> B.
>>>
>>> On Fri, Feb 25, 2011 at 9:17 PM, Me  wrote:
>>>
>>>> I have this code below, it still gives me the error, 
>>>> ActiveRecord::MultiparameterAssignmentErrors.  It is not catching the 
>>>> rescue 
>>>> for some reason.  Ideas? 
>>>>
>>>> def create
>>>> bad =[]
>>>> @tour_type = TourType.new(params[:tour_type])
>>>> if @tour_type.save
>>>>  render :update do |page|
>>>>page << "Redbox.close;"
>>>>page.call "ProtoGrowl.success", "Succesfully created #{@
>>>> tour_type.name}"
>>>>  end
>>>> end
>>>> rescue ActiveRecord::MultiparameterAssignmentErrors
>>>>  if params[:tour_type][:usual_price_number].blank?
>>>>bad << "Usual price must not be 0.00"
>>>>  end
>>>> 
>>>> rescue ActiveRecord::RecordInvalid
>>>>  bad << "#...@tour_type.errors.full_messages}"
>>>> 
>>>> unless bad.empty?
>>>>  flash.now[:error] = "#{bad.length} Errors have occured in this 
>>>> form" 
>>>>  flash.now[:items] = bad 
>>>>  render :update do |page|
>>>> page[:flash].replace_html :partial => 'shared/flash_box' and 
>>>> return
>>>>   end
>>>> end
>>>>   end
>>>>  
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To post to this group, send email to rubyo...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> rubyonra...@googlegroups.com.
>>>>
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] multiple rescue for create

2011-02-25 Thread Me
So is this the correct way:

def create
bad =[]
begin
  @tour_type = TourType.new(params[:tour_type])
  if @tour_type.save
   render :update do |page|
 page << "Redbox.close;"
 page.call "ProtoGrowl.success", "Succesfully created 
#{@tour_type.name}"
   end
  end
  rescue ActiveRecord::MultiparameterAssignmentErrors
   if params[:tour_type][:usual_price_number].blank?
 bad << "Usual price must not be 0.00"
   end
  
   
  rescue ActiveRecord::RecordInvalid
   bad << "#{@tour_type.errors.full_messages}"
 
end
unless bad.empty?
 flash.now[:error] = "#{bad.length} Errors have occured in this form" 
 flash.now[:items] = bad 
 render :update do |page|
page[:flash].replace_html :partial => 'shared/flash_box' and return
  end
end
  end

On Friday, February 25, 2011 9:37:05 PM UTC-6, bacrossland wrote:
>
> That is because you did not setup your error handling correctly. A rescue 
> block is done within a begin and end. You don't have that. You have rescues 
> just tossed into your code. The format should look something like this:
>
> begin
>   puts 10/0 #Bad code which will throw a ZeroDivisionError
> rescue ZeroDivisionError
>   puts "Stop dividing by zero or the universe will end!"
> end
>
> See the docs on error handling for more information.
>
> http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html
>
> Thanks,
> B.
>
> On Fri, Feb 25, 2011 at 9:17 PM, Me  wrote:
>
>> I have this code below, it still gives me the error, 
>> ActiveRecord::MultiparameterAssignmentErrors.  It is not catching the rescue 
>> for some reason.  Ideas? 
>>
>> def create
>> bad =[]
>> @tour_type = TourType.new(params[:tour_type])
>> if @tour_type.save
>>  render :update do |page|
>>page << "Redbox.close;"
>>page.call "ProtoGrowl.success", "Succesfully created #{@
>> tour_type.name}"
>>  end
>> end
>> rescue ActiveRecord::MultiparameterAssignmentErrors
>>  if params[:tour_type][:usual_price_number].blank?
>>bad << "Usual price must not be 0.00"
>>  end
>> 
>> rescue ActiveRecord::RecordInvalid
>>  bad << "#...@tour_type.errors.full_messages}"
>> 
>> unless bad.empty?
>>  flash.now[:error] = "#{bad.length} Errors have occured in this form" 
>>  flash.now[:items] = bad 
>>  render :update do |page|
>> page[:flash].replace_html :partial => 'shared/flash_box' and 
>> return
>>   end
>> end
>>   end
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] multiple rescue for create

2011-02-25 Thread Me
I have this code below, it still gives me the error, 
ActiveRecord::MultiparameterAssignmentErrors.  It is not catching the rescue 
for some reason.  Ideas? 

def create
bad =[]
@tour_type = TourType.new(params[:tour_type])
if @tour_type.save
 render :update do |page|
   page << "Redbox.close;"
   page.call "ProtoGrowl.success", "Succesfully created 
#{@tour_type.name}"
 end
end
rescue ActiveRecord::MultiparameterAssignmentErrors
 if params[:tour_type][:usual_price_number].blank?
   bad << "Usual price must not be 0.00"
 end

rescue ActiveRecord::RecordInvalid
 bad << "#{@tour_type.errors.full_messages}"

unless bad.empty?
 flash.now[:error] = "#{bad.length} Errors have occured in this form" 
 flash.now[:items] = bad 
 render :update do |page|
page[:flash].replace_html :partial => 'shared/flash_box' and return
  end
end
  end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Using form_tag with a bit of rails 'magic'?

2011-02-18 Thread Me
Your setter needs to be same name as the field that rails is looking for.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails 3 initialize module, running cucumber

2011-02-11 Thread Me
I have this in my environment file, I get "The error occurred while 
evaluating nil.[] (NoMethodError)" on the  S3Config.key= line  when running 
cucumber.  Why is it not loading up the module when running cucumber?

module S3Config
  mattr_accessor :key
  mattr_accessor :sec
end

class ActiveRecord::Base
  include S3Config
  extend DynamicMethods
end

S3Config.key = AppConfig['access_key_id']
S3Config.sec = AppConfig['secret_access_key']
ActionMailer::Base.default_url_options[:host]=AppConfig['base_url']

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: One to many ralationships

2011-01-28 Thread Me
Nope.

class Worker <  AR
has_one :job
end

--
class Job < AR
belongs_to :worker
end

worker_id in this table
-

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Tricky Model association

2011-01-28 Thread Me
:finder_sql => "sql"

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: how to write some search functionality in ror

2011-01-28 Thread Me
User.find(:column, ) Is a user a patient or have many patients?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] js insert this.value into id

2011-01-28 Thread Me
Is there a way to to put the id from the select into the id of the url 
instead of the :with param?

= collection_select :category, :id, Category.all, :id, :name, {:prompt => 
'None'}, :onchange => 
remote_function(:url=>{:controller=>'sub_categories',:action=>'get_sub_categories',:id=>'1'},:method=>'get',:with=>"'myid='
 
+ this.value")
  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: text box value in the confirmation popup

2011-01-17 Thread Me
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: text box value in the confirmation popup

2011-01-17 Thread Me
No I am not getting a prompt.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Fwd: Java vs. RoR

2011-01-16 Thread Me
haaa, ya at the bookstore there is about 3 full shelves of java crap, and 
half to 3/4 of a shelf of rails/ruby books.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: text box value in the confirmation popup

2011-01-16 Thread Me
ya is this correct?

 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: text box value in the confirmation popup

2011-01-16 Thread Me
Actually what I posted is what rails produces, I copied the javascript from 
the page source.  I was more interested how to get the div id value into the 
string, is it a quote issue?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: tracking the shopping cart for an unregistered user

2011-01-16 Thread Me
You could assign each session a random number for each one. 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: text box value in the confirmation popup

2011-01-16 Thread Me
Ok I am doing it the manual way, how do I get the value to show up? Are the 
quotes correct?

  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: tracking the shopping cart for an unregistered user

2011-01-16 Thread Me
I would probably make that kind of session expire quickly and add a method 
to remove that from the db after a certain time period.  I have a prod app 
that I am working on fora company that keeps the sessions in the db and we 
wrote a task that deletes all session older than like 90 days I think or 
something like that.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: text box value in the confirmation popup

2011-01-16 Thread Me
I had this originally:

%= @deposit = javascript_tag "$('funding_transaction_deposit').innerHTML" %>
  
<%= submit_tag 'Create', :confirm => "Are you sure you would like 
#{@deposit} dibits deposited?"  %>
  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: text box value in the confirmation popup

2011-01-16 Thread Me
Is there no way to assign the val to a var and just putting it in the 
string?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Re rendering a page with an additional Param

2011-01-14 Thread Me
<%= hidden_field_tag  %>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] text box value in the confirmation popup

2011-01-14 Thread Me


compile error
/Users/chabgood/web_apps_svn_working/dibspace_unfuddle/r2/app/views/funding_transactions/_form.rhtml:15:
 syntax error, unexpected $undefined
... you sure you would like " + $('funding_transaction_deposit'...

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: text box value in the confirmation popup

2011-01-14 Thread Me
anybody?

I have a text box in a form I would like the value of displayed in the 
confirmation box.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] text box value in the confirmation popup

2011-01-13 Thread Me
kinda hung here I have this and I am getting js in the popup.

<%= @deposit = javascript_tag "$('funding_transaction_deposit').innerHTML" 
%>
  
<%= submit_tag 'Create', :confirm => "Are you sure you would like 
#{@deposit} dibits deposited?"  %>
  

I want to display the value of a text box in the confirmation popup

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Re rendering a page with an additional Param

2011-01-13 Thread Me
You can just pass it into the view as a hidden param. 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Re: refactoring models

2011-01-13 Thread Me
Maybe so but you do not have to 3rd level normalize EVERY thing in a db.  I 
learned to normalize your tables.  BUT, now if you have only several items 
that are fixed that are not going to change it is beter to NOT put it in the 
db if you are not going to change it or need it to create an interface to 
manage it.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: refactoring models

2011-01-12 Thread Me
I would think that a select box populated by an array or hash is MUCH faster 
and less system intensive than doing any db lookup.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: refactoring models

2011-01-12 Thread Me
not sure what else to say.  If you have a db table with 2 lines that are 
never going to change.  You refactor that into the other model that 
references it and remove the original AR model.  I was wondering, when you 
remove the table if you were to keep the original model but refactor the 
stuf into that mode instead of the referring model does it consume the same 
memory, BW, whatever, as opposed to the AR version of the model.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] [ANN] TrackHistory: An easy way to track changes

2011-01-12 Thread Me
acts_as_audited or acts_as_versioned, things like that.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: refactoring models

2011-01-12 Thread Me
OK from my first post.  I am refactoring trying to make my app lean and 
agile.  The less models loaded up the less memory obviously.  I was curious 
if refactored out the DB portion and left the ruby model if it would have a 
noticeable impact or whether getting rid of the model and refactor into 
another on needed  is a better way to lean the app.  I am following the 
Rails anitpatterns book for this stuff.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: refactoring models

2011-01-12 Thread Me
rails models:

class me 

end

class me < ActiveRecord::Base

end

Does the rails AR one use much more system resources than the ruby class? 
 Other than the methods being defined for the AR one.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: refactoring models

2011-01-12 Thread Me
anybody?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Executing action without reloading

2011-01-11 Thread Me
Well you could always just do:

button_to_function "submit", remote_function(:url => { } )

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Executing action without reloading

2011-01-11 Thread Me
Get it out of the hash, it is a stand alone value.

<% form_for :support, @support, :url => { :controller => 
"concepts", :action => "sendContactMail", :id => 0, :type_id => 
@contactType.id, :property_id => @property.id },  :remote => 
true do |fContact| %> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Executing action without reloading

2011-01-11 Thread Me
The remote is part of the form not the url.  Put it outside the url section.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: refactoring models

2011-01-11 Thread Me
Ya, memory usage, system performance and such.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Executing action without reloading

2011-01-11 Thread Me
Same syntax in the form.  

form_for @whatever, :remote => true 

submit_tag

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] refactoring models

2011-01-11 Thread Me
I have the rails antipatterns book and I am doing some refactoring.  Is 
there a big resource difference between a rails model backed with a db table 
and just a regular model other than the metaprogramming methods being 
defined for the rails model/table

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] parse.rb:33: [BUG] Segmentation fault ruby 1.8.7 Hpricot

2011-01-06 Thread Me
Has anyone had this issue above with hpricot?  I cannot seem to find a 
solution that works. 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] [Rails 3] link_to_remote, no action

2011-01-05 Thread Me
The url in the link to remote below does not have the action in the url. 
Ideas?

link_to_remote(comment.text, :url => 
{:controller=>'workshop_comments',:action=>'index',:id=>comment}))

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Model's boolean attribute always being set to true?

2010-12-31 Thread Me
There is a value in the column which means true,  you need to create a 
method in the model to translate that for you.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] uninitialized constant RPXNow::UserIntegration

2010-12-31 Thread Me
We are using the rpx gem in our rails 3 program.  I uninstalled the plugin 
and tried to login and I get the error above.  Ideas??I did restart the 
server.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] highlighter

2010-12-29 Thread Me
Is there a way to use what highlighter.com does in a rails app?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails 3 helpers

2010-12-19 Thread Me
This code outputs html to the page not the icons, ideas?



def pub_social_links(pub)
  html = ""
  twit = pub.twitter.blank? ? ['off',"#{pub.twitter}",'disabled'] : 
['on','','']
  rss = pub.rss.blank? ? ['off',"#{pub.rss}",'disabled'] : ['on','']
  fb = pub.facebook.blank? ? ['off',"#{pub.facebook}",'disabled'] : 
['on','','']
  html << link_to( "image_tag('icons/rss_#{rss[0]}.png')", rss[1], 
:disabled => "#{rss[2]}")
  html << link_to( "image_tag('icons/twitter_#{twit[0]}.png')", 
"#{twit[1]}", :disabled => "#{twit[2]}")
  html << link_to( "image_tag('icons/facebook_#{fb[0]}.png')", 
"#{fb[1]}", :disabled => "#{fb[2]}")
return html
  end

image_tag('icons/rss_off.png')image_tag('icons/twitter_off.png')image_tag('icons/facebook_off.png') 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails code to sql

2010-12-19 Thread Me
Is there a relatively easy way to do this code in sql?

@categories=Category.all.reject{|n| n.blank?}.sort{|a,b| a.name 
<=>b.name}.collect{|t| [t.name,t.name.downcase.gsub(' ','_')]}

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] active merchant - payal

2010-12-16 Thread Me
I have an active site that has nothing but the code to do login with on the 
backend.  How do I get to where I can get to see what the signature is for 
the user if all he has is the login for production?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] aasm 2 columns

2010-12-10 Thread Me
Is ti possible to use aasm with 2 aasm column for 2 types of states for
2 different things?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] has_many, conditions overrride

2010-12-09 Thread Me
class name is irrelevant I just need to know if I can override the
conditions.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] has_many, conditions overrride

2010-12-09 Thread Me
I have a prod site that has:

has_many :data, :conditions => {:aasm => 'active')

I do not want to modify it as I do not want to break existing
functionality

Is there a way to overrride this at runtime?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Rails 3 load order?

2010-12-01 Thread Me
Does anyone have a link or something on what is the difference on how
things load up in rails 3 compared to rails 2.3.5?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: rails 3 cucumber load env

2010-11-28 Thread Me
anybody?

On Nov 24, 5:13 pm, Me  wrote:
> I already posted this on the cukes group but figure I would try here
> as well.  Our prod app has an initializer that load up some constants
> for use in the app, no biggy.  The issue is with rails 3 when I 
> invokecucumberit chokes not recognizing them even though it works fine in
> dev mode and prod mode.  It obviously is processing the init file
> because I have a module that has some attributes inside it that it is
> giving errors.  Ideas??

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails 3 render update mce

2010-11-25 Thread Me
Migrating our app to rails 3 with a render :update with mce.  It
throws the JS try error to the screen.  If I put the mce command into
firebug it works fine.  suggestions?

render :update do |page|
  page << "tinyMCE.execCommand('mceInsertContent',false,'m');"
end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] rails 3 cucumber load env

2010-11-24 Thread Me
I already posted this on the cukes group but figure I would try here
as well.  Our prod app has an initializer that load up some constants
for use in the app, no biggy.  The issue is with rails 3 when I invoke
cucumber it chokes not recognizing them even though it works fine in
dev mode and prod mode.  It obviously is processing the init file
because I have a module that has some attributes inside it that it is
giving errors.  Ideas??

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] aasm code into module

2010-11-22 Thread Me
Is it posible to move big aasm code into a module and then include it
into a class and it work correctly?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] modeling questions

2010-11-18 Thread Me
Howdy,  I have a couple questions on the best way to model things in
rails.

1.  How to model a table so an admin person can selectively turn on/
off hard/soft deletes from a table at a table level?
2.  Model a parent/child relationship that can go infinitely deep.
specifically equipment,  parent => child => child => child 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] mongrel_rails logger

2010-11-10 Thread Me
I have a live site that has a mongrel_rails instance running.  When I
see the process is shows that is has the -e production  value set.  I
am not seeing any logger info in the production log.  Ideas?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



  1   2   3   4   >