[Rails] Looking for Ruby on Rails developer for eCommerce project

2013-09-11 Thread Mills Hawkins
Looking for Ruby on Rails developer for eCommerce project.  Preferably in 
Columbus, OH

-- 
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/556ce73b-096e-472f-98c1-d6e590058510%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Mandrill mail problem

2013-09-11 Thread Avi
Hello All,

I am trying to use Mandrill api in my rails app.
I am getting this error every time:-

Net::SMTPServerBusy (401 4.1.7 Bad sender address syntax)

I am using Ruby - 1.9.3, rails - 3.2.8, Thin server,  Ubuntu 12.10.

in Gemfile:-
gem mandrill-api, ~ 1.0.45
gem 'mandrill_mailer'

application.rb:-

config.action_mailer.default_url_options = { :host = 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address   = smtp.mandrillapp.com,
:port  = 587,
:user_name = ENV[some email],
:password  = ENV[api key], 
:authentication = 'login' 
}

In mailer.rb:-

def verify_code(user)
mail(:to = user.email,  :subject = TEXT) do |format|
  format.html
end
  end

In controller:-

UserMailer.verify_code(resource).deliver  # Here resource is the user object

What am I doing wrong here?



Thanks, 
Avinash

-- 
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/a0ba12be-3948-4cdd-b0f9-1edaf9e69fec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Ruby on Rails developer for top company in Munich / Germany. Visa Sponsoring!

2013-09-11 Thread Thomas Lersch
Ruby on Rails developer for top company in Munich / Germany. Non EU
applicants very welcome, we sponsor Visa!

Senior Ruby on Rails Developer is required by one of the most successful
start ups of the last five years. This is a senior addition to the team
and you will be responsible for developing a mission critical e-commerce
system. You will be working on a range of existing and Beta products and
will be pivotal in helping my client achieve the next stage of their
growth.

To be considered for this role, you will ideally be a Senior Ruby on
Rails developer at the moment in a high transactional environment (i.e.
online, e-commerce, sports betting and so on). You will be a Ruby
evangelist; you will know Ruby inside out and will be fascinated by its
scope (but also its limitations and how to get around those!). You will
ideally have experience with a NoSQL database, such as Hadoop or
MongoDB, and will have worked in an Agile environment previously. My
client work in a TDD environment so you will have worked with Cucumber
in the past.

Feel free to apply at h...@buerolersch.de

-- 
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/msgid/rubyonrails-talk/76d486a45f9e7f6f3f3864ab5a832821%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Text field formatting

2013-09-11 Thread Dave Castellano
Hi,

I am trying to figure out how to convert line breaks  to html line
breaks ie br

The text is imput and saved as:
Which structures traverse above the annulus of Zinn?
A) Lacrimal nerve
B) Frontal nerve
C) Nasociliary nerve
D) CN IV
E) CN III

but, I have a text field in my show action view with the following:
%= #{@formatted_question[:question]} %

which produces:
Which structures traverse above the annulus of Zinn? A) Lacrimal nerve
B) Frontal nerve C) Nasociliary nerve D) CN IV E) CN III

The line breaks are still there, they just aren't being converted to
HTML line breaks.  I can see them when I view the source.

How can I get the line breaks back??

Thanks,
Dave

-- 
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/msgid/rubyonrails-talk/7d22b9b10c49cb35912d5238c53fe44a%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Text field formatting

2013-09-11 Thread Dave Castellano
Got it!  simple_format(text)

-- 
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/msgid/rubyonrails-talk/0b4d68e7a3fa5127c54618b6844761eb%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Text field formatting

2013-09-11 Thread jsnark


 %= #{@formatted_question[:question].gsub(/\n/, 'br/')} % 



-- 
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/68c6ab6b-4e62-4a3f-81c6-db8755718aa4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Text field formatting

2013-09-11 Thread jsnark
Oops.

%= #{@formatted_question[:question].gsub(/\n/, 'br/').html_safe} % 


On Wednesday, September 11, 2013 8:46:16 AM UTC-4, jsnark wrote:


 %= #{@formatted_question[:question].gsub(/\n/, 'br/')} % 



-- 
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/5f0a91ea-85d7-432a-aefa-d1983901c422%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Why does Rails debug information shows up in production?

2013-09-11 Thread Jason Hsu, Rubyist
I recently upgraded Bargain Stock Funds (http://www.bargainstockfunds.com) 
and Doppler Value Investing (http://www.dopplervalueinvesting.com) from 
Rails 3.2 to Rails 4.0.

I've noticed that the debug information is on the production web site even 
though the app/views/layouts/application.html.erb file has the line %= 
debug(params) if Rails.env.development? %.  This SHOULD suppress the 
debug information on each page in the production environment, but it 
doesn't seem to be working.  (The technical tabs on both web sites contain 
the links to the source code.)

Commenting out the %= debug(params) if Rails.env.development? % line 
does remove the debug information, but I need to retain it in the 
development environment.  Thus, I believe that my production environment is 
being mistaken for the development environment.

My questions:
1.  How do I confirm whether I'm in the development or production 
environment?  My assumptions don't seem to be holding up.
2.  What is the mechanism that specifies the development or production 
environment?

-- 
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/8b16c0e3-0193-474a-ab7f-cc942ef6def0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] Why does Rails debug information shows up in production?

2013-09-11 Thread Tamara Temple

On Sep 11, 2013, at 11:25 AM, Jason Hsu, Rubyist jhsu802...@gmail.com wrote:

 I recently upgraded Bargain Stock Funds (http://www.bargainstockfunds.com) 
 and Doppler Value Investing (http://www.dopplervalueinvesting.com) from Rails 
 3.2 to Rails 4.0.
 
 I've noticed that the debug information is on the production web site even 
 though the app/views/layouts/application.html.erb file has the line %= 
 debug(params) if Rails.env.development? %.  This SHOULD suppress the debug 
 information on each page in the production environment, but it doesn't seem 
 to be working.  (The technical tabs on both web sites contain the links to 
 the source code.)

This tells me you are not running with RAILS_ENV='production'. Instead, it is 
either not set (defaults to 'development') or is set to 'development'.


 
 Commenting out the %= debug(params) if Rails.env.development? % line does 
 remove the debug information, but I need to retain it in the development 
 environment.  Thus, I believe that my production environment is being 
 mistaken for the development environment.
 
 My questions:
 1.  How do I confirm whether I'm in the development or production 
 environment?  My assumptions don't seem to be holding up.

You check Rails.env or ENV['RAILS_ENV']

 2.  What is the mechanism that specifies the development or production 
 environment?

The RAILS_ENV environment variable is set to the environment you want loaded. 
If it is not set or empty, it defaults to 'development'.


 
 -- 
 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/8b16c0e3-0193-474a-ab7f-cc942ef6def0%40googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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/CD57E77C-3940-4269-8A39-9A8D5C985793%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Mandrill mail problem

2013-09-11 Thread Joel Pearson
What are you using as the sender (from) address?

-- 
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/msgid/rubyonrails-talk/fd2e10775152fa4a33b4d48f3379a466%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Why does Rails debug information shows up in production?

2013-09-11 Thread Jason Hsu, Rubyist
I've done some troubleshooting and have confirmed that what should be my 
production environment is being seen by Rails as the development 
environment instead.

What is the proper way to make sure that my production environment is 
actually seen by Rails as the production environment?  Please keep in mind 
that I'm in Rails 4.0 and not 3.2 now.

-- 
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/7ccd029a-7150-483c-bfc7-029fb248839b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Advice on building a Rails App

2013-09-11 Thread Chris Kuffo
Hello..

I'm hoping to get some advice on building a certain section of my
prototype I am trying to build. What would recommendations would anybody
have if I wanted to create a questionnaire that would create a set of
folders based off of the answers in the questionnaire they filled out..
be displayed in a tree view.

Example:
Questions
1. Name of company?
2. Name of division?
3. Name of project?

Treeview Example

Babco LLC.
-- Marketing
- Branding campaign

-- 
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/msgid/rubyonrails-talk/f4fc827dfe1f8e26f86a34ff5f9219ba%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Advice on building a Rails App

2013-09-11 Thread Chris Kuffo
the tree view would be more for navigation purposes to a set of working 
files underneath the project directory.

Example under project folder we would have a project summary page where 
a user can enter information related to the project.

an example of what this would look like would be on the main page the 
left side would consist of the tree navigation and on the right side of 
the page would display the page where one can enter or edit info

-- 
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/msgid/rubyonrails-talk/2dca8c147b63e2f68ae848e4fb7f9a31%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] Advice on building a Rails App

2013-09-11 Thread Walter Lee Davis
Do you need this to be an actual tree of folders on the server, or a set of 
virtual folders shown to the user as if it was real? What purpose do they serve 
in the real world?

Walter

On Sep 11, 2013, at 3:40 PM, Chris Kuffo wrote:

 Hello..
 
 I'm hoping to get some advice on building a certain section of my
 prototype I am trying to build. What would recommendations would anybody
 have if I wanted to create a questionnaire that would create a set of
 folders based off of the answers in the questionnaire they filled out..
 be displayed in a tree view.
 
 Example:
 Questions
 1. Name of company?
 2. Name of division?
 3. Name of project?
 
 Treeview Example
 
 Babco LLC.
 -- Marketing
 - Branding campaign
 
 -- 
 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/msgid/rubyonrails-talk/f4fc827dfe1f8e26f86a34ff5f9219ba%40ruby-forum.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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/184EB1E0-5CCC-416A-9FB1-F5739BDDC624%40wdstudio.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] Advice on building a Rails App

2013-09-11 Thread Walter Lee Davis
So these could be attributes on your Project model, and gathered as such. 
They're not necessarily folders but metadata about a project, right? You're 
not necessarily creating a folder on your server where you will be gathering 
actual files, right?

Walter

On Sep 11, 2013, at 4:23 PM, Chris Kuffo wrote:

 the tree view would be more for navigation purposes to a set of working 
 files underneath the project directory.
 
 Example under project folder we would have a project summary page where 
 a user can enter information related to the project.
 
 an example of what this would look like would be on the main page the 
 left side would consist of the tree navigation and on the right side of 
 the page would display the page where one can enter or edit info
 
 -- 
 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/msgid/rubyonrails-talk/2dca8c147b63e2f68ae848e4fb7f9a31%40ruby-forum.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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/EF75FC3D-3E99-4FCF-9C89-F3C6D7CEC8E8%40wdstudio.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Advice on building a Rails App

2013-09-11 Thread Chris Kuffo
Exactly.. not a real folders

-- 
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/msgid/rubyonrails-talk/4a5e4131e2ba97e7b6653ec3817ca58f%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Should sanitize return an empty string for non-strings?

2013-09-11 Thread Paul E. G. Lynch
If, in your view, you are expecting params[:name] to be a string, but 
actually rails has parsed it into {.=1234} (or something more 
malicious), then currently
%= sanitize(params[:name]) % blows up because the hash does not respond 
the expected methods from the sanitize call.

I could put in code to check that the params values I am sanitizing are 
strings, but it seems like it would be better for sanitize to handle that, 
and perhaps just return the empty string if the processing of the input 
raises an exception.

--Paul

-- 
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/71ca60c3-40da-49a0-805b-648bab2b8d0b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] :layout = question

2013-09-11 Thread jmcguckin
I'm looking at someone else's code and I'm not sure what this does.

In a controller action for 'show' is the following:

render :layout = 'edit'

Ok, there a layout for edit, basically it is the standard javascript 
includes, anti csfr stuff and 'yield'.

Hmm, what's it yielding to? Which template is it yielding to? There are 
both  'edit.html.erb' and  'show.html.erb' templates.

Thanks,

Joe

-- 
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/544cfda1-92bf-4625-8c7a-4968a319bd32%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] :layout = question

2013-09-11 Thread Dave Aronson
On Wed, Sep 11, 2013 at 7:00 PM, jmcguckin mcguc...@gmail.com wrote:

 In a controller action for 'show' is the following:

 render :layout = 'edit'

 Ok, there a layout for edit, basically it is the standard javascript
 includes, anti csfr stuff and 'yield'.

 Hmm, what's it yielding to? Which template is it yielding to? There are both
 'edit.html.erb' and  'show.html.erb' templates.

It would be yielding to whatever template the controller action would
be using.  In this case, that would be show.html.erb, since you're in
the show action.

-Dave

-- 
Dave Aronson, the T. Rex of Codosaurus LLC,
secret-cleared freelance software developer
taking contracts in or near NoVa or remote.
See information at http://www.Codosaur.us/.

-- 
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/CAHxKQihjYOw-JFzo89ig-DB8hB1J1fp9MTUFt25miGjeXYZ12Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] :layout = question

2013-09-11 Thread Jordon Bedwell
On Wed, Sep 11, 2013 at 6:00 PM, jmcguckin mcguc...@gmail.com wrote:
 In a controller action for 'show' is the following:

 render :layout = 'edit'

 Ok, there a layout for edit, basically it is the standard javascript
 includes, anti csfr stuff and 'yield'.

 Hmm, what's it yielding to? Which template is it yielding to? There are both
 'edit.html.erb' and  'show.html.erb' templates.

Controller = show.html.erb = edit.html.erb
That's exactly it:  edit.html.erb yields show.html.erb.
Both the layout and the view are templates but the view goes into the layout.

-- 
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/CAM5XQnx65sac3tW5B3nYKx2FWCkoeguRD97M3y08EwUTWtePrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Should sanitize return an empty string for non-strings?

2013-09-11 Thread Robert Walker
Paul Lynch wrote in post #1121214:
 If, in your view, you are expecting params[:name] to be a string, but
 actually rails has parsed it into {.=1234} (or something more
 malicious), then currently
 %= sanitize(params[:name]) % blows up because the hash does not
 respond
 the expected methods from the sanitize call.

 I could put in code to check that the params values I am sanitizing are
 strings, but it seems like it would be better for sanitize to handle
 that,
 and perhaps just return the empty string if the processing of the input
 raises an exception.

Hum. It seems to me that blowing up is the right thing to do in this 
scenario. More precisely an exception should be raised indicating a 
programmer mistake of passing an illegal argument to a method expecting 
a string.

-- 
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/msgid/rubyonrails-talk/c54d51850e1948568b77874beb9f21e1%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] :layout = question

2013-09-11 Thread Rob Biedenharn
On 2013-Sep-11, at 19:06 , Dave Aronson wrote:

 On Wed, Sep 11, 2013 at 7:00 PM, jmcguckin mcguc...@gmail.com wrote:
 
 In a controller action for 'show' is the following:
 
render :layout = 'edit'
 
 Ok, there a layout for edit, basically it is the standard javascript
 includes, anti csfr stuff and 'yield'.
 
 Hmm, what's it yielding to? Which template is it yielding to? There are both
 'edit.html.erb' and  'show.html.erb' templates.
 
 It would be yielding to whatever template the controller action would
 be using.  In this case, that would be show.html.erb, since you're in
 the show action.
 
 -Dave
 
 -- 
 Dave Aronson, the T. Rex of Codosaurus LLC,
 secret-cleared freelance software developer
 taking contracts in or near NoVa or remote.
 See information at http://www.Codosaur.us/.


The part that is (probably) causing you to think something's odd is that the 
view is actually processed first. The result and any 'content_for' sections 
have been saved before the layout is processed. The main result of the view is 
inserted where the `yield` is processed and the result of a `content_for :foo` 
will be inserted if there is a `yield :foo`.

-Rob

Rob Biedenharn
rob.biedenh...@gmail.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/msgid/rubyonrails-talk/4671F36A-5641-4CD3-B375-7251A87FCCA0%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Why does Rails debug information shows up in production?

2013-09-11 Thread Jason Hsu, Rubyist
I found out what the problem was.  The nginx.conf file in the production 
environment (which is automatically generated when I create the Rails 4.0 
app in WebFaction) specified the development environment instead.  I 
changed it to specify the production environment.  Now the production 
environment actually behaves like the production environment.

-- 
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/f493c694-1901-4462-910f-4032c7e8d6e7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.