[Rails] Re: has_one accepts_nested_attributes_for fields_for NOT WORKING HELP

2010-11-28 Thread tundrax
Just tested. Everything works fine.

Make sure:

1) you didn't forget to put "belongs_to :user" association in your
Address model
2) use "<%=" for your "f.fields_for :address" in the _form view file.

Hope this helps.

On Nov 29, 2:08 pm, Humberto Ribeiro  wrote:
> The result is the same... the field do not show in view when browsing
> to /users/new
>
> On 28 nov, 14:51, ssmithstone  wrote:
>
>
>
>
>
>
>
> > in your
>
> > def new
>
> > try @user.address = Address.new
>
> > On Nov 28, 4:50 pm, Humberto Ribeiro  wrote:
>
> > > Model address has 8 attributes... i did it to minimize user table
> > > size.
>
> > > About the problem... just try in your machine you will se it not
> > > workin as should do.
>
> > > On 28 nov, 13:41, Walter Lee Davis  wrote:
>
> > > > On Nov 28, 2010, at 11:29 AM, Humberto Ribeiro wrote:
>
> > > > > MODEL
> > > > > class User < ActiveRecord::Base
> > > > >  has_one :address, :dependent => :destroy
> > > > >  accepts_nested_attributes_for :address
> > > > > end
>
> > > > > CONTROL
> > > > >  def new
> > > > >   �...@user = User.new
> > > > >   �...@user.build_address  # Adicionei
> > > > >  ...
>
> > > > > VIEW partial _form
> > > > > 
> > > > > <% f.fields_for :address do |b| %>     # Adicionei
> > > > >    <%= b.text_field :city_manual %>    # Adicionei
> > > > > <% end %>                                        # Adicionei
> > > > > 
>
> > > > > So this is not working... when browser to users/new it do not show the
> > > > > field as should...
> > > > > Change this to a has_many all works.
> > > > > Using has_one this make me crazy and not work... anyone help?
>
> > > > Sorry, I don't have an answer for you on this. But I'm curious -- why  
> > > > are you putting the address in a separate model if you are using  
> > > > has_one? It seems like an over-normailization to me. Why not just put  
> > > > those attributes in the user and be done with it?
>
> > > > Walter

-- 
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: error: procedure entry point not found

2010-11-28 Thread Keyur P.
this works as mentioned above:

copy libmysql.dll (from my MySQL installation) to my ruby/bin folder

-- 
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-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: Facebook like page Count

2010-11-28 Thread rajeevsharma86
Or how it can be Done by Ajax OR something else please suggest

On Mon, Nov 29, 2010 at 11:12 AM, ashu  wrote:

> How can i count a Facebook like page Count in my rails application and
> need to save that in my db.
>
> or need to know :fb_like => 'true' Or false




-- 
Thanks:
Rajeev sharma
+919013155133

-- 
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] Facebook like page Count

2010-11-28 Thread ashu
How can i count a Facebook like page Count in my rails application and
need to save that in my db.

or need to know :fb_like => 'true' Or false

-- 
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: has_one accepts_nested_attributes_for fields_for NOT WORKING HELP

2010-11-28 Thread Humberto Ribeiro
The result is the same... the field do not show in view when browsing
to /users/new

On 28 nov, 14:51, ssmithstone  wrote:
> in your
>
> def new
>
> try @user.address = Address.new
>
> On Nov 28, 4:50 pm, Humberto Ribeiro  wrote:
>
> > Model address has 8 attributes... i did it to minimize user table
> > size.
>
> > About the problem... just try in your machine you will se it not
> > workin as should do.
>
> > On 28 nov, 13:41, Walter Lee Davis  wrote:
>
> > > On Nov 28, 2010, at 11:29 AM, Humberto Ribeiro wrote:
>
> > > > MODEL
> > > > class User < ActiveRecord::Base
> > > >  has_one :address, :dependent => :destroy
> > > >  accepts_nested_attributes_for :address
> > > > end
>
> > > > CONTROL
> > > >  def new
> > > >   �...@user = User.new
> > > >   �...@user.build_address  # Adicionei
> > > >  ...
>
> > > > VIEW partial _form
> > > > 
> > > > <% f.fields_for :address do |b| %>     # Adicionei
> > > >    <%= b.text_field :city_manual %>    # Adicionei
> > > > <% end %>                                        # Adicionei
> > > > 
>
> > > > So this is not working... when browser to users/new it do not show the
> > > > field as should...
> > > > Change this to a has_many all works.
> > > > Using has_one this make me crazy and not work... anyone help?
>
> > > Sorry, I don't have an answer for you on this. But I'm curious -- why  
> > > are you putting the address in a separate model if you are using  
> > > has_one? It seems like an over-normailization to me. Why not just put  
> > > those attributes in the user and be done with it?
>
> > > Walter

-- 
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: button_to confirm not working

2010-11-28 Thread loominator1970
Thanks for all the input, turns out I didn't have my javascript ducks
in a row, since I'm a JS newb.

I'm going with an all jquery solution, and I needed to do the
following things:
# in the layouts/application.html.erb
# remove the line   <%= javascript_include_tag :defaults %>
# and add
<%= javascript_include_tag 'jquery-1.4.3.js', 'rails', 'application'
%>

and in my public/javascripts directory
add 'jquery-1.4.3.js' and 'rails.js' (from https://github.com/rails/jquery-ujs)

Works like a dream now!

Dave

On Nov 18, 12:16 pm, Marnen Laibow-Koser  wrote:
> Zoltan Gero wrote in post #962389:
>
> > Hello,
>
> > Is any method associated with it i your controller? like:
> > def destroy
> > �...@user.destroy
> >   redirect_to
> > end
>
> > For first shot for me it seems to be the problem, not JavaScript.
>
> No.  The problem is that for some reason the JavaScript is not being
> generated, or at least not firing, as expected.
>
> To the OP: do you see the generated JS in the page source?
>
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> --
> Posted viahttp://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-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: converting xml to a OpenStruct

2010-11-28 Thread Rajinder Yadav

On 10-11-28 07:01 PM, Marnen Laibow-Koser wrote:

Rajinder Yadav wrote in post #964515:

Hi just wondering if there is a easy way to turn an xml entity into a
object like of type OpenStruct where i can access everything like a
property?

It's kind of like parsing xml, I already know about nokogiri, but I want
to work is a OpenStruct and not a DOM object, does that make sense? =P


Not really.  But if I understand you correctly, you will probably want
to look at HttParty and Crack.



--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely



Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org



No that's not what I am looking for, here is something closer to home. I 
came across this just now: http://snippets.rorbuilder.info/posts/show/1237


--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1

--
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] Labels, I18n and accepts_nested_attributes_for

2010-11-28 Thread Paul Schreiber
Note: I am using Rails 2.3.10.

Normally, you can use Rails’ I18n system to generate label text.

For example, suppose you have a Person class with a name attribute. And this 
ERB:
<%= form_for @person do |f| %>
<%= f.label :name %>
<%= f.text_field :name %>
<% end %>

And you’d construct your en.yml like so:
en:
  helpers:
label:
  name: “your name”

However, this doesn’t work very well with related objects and 
accepts_nested_attributes_for. Suppose you have the same Person class as 
before. And person has_many :activities (likewise, activity belongs_to :person) 
and accepts_nested_attributes_for :activities. 

Now your ERB looks like this:
<%= form_for @person do |f| %>
<%= f.label :name %>
<%= f.text_field :name %>
<% f.fields_for :activities do |a| %>
<%= l.label :difficulty %>
<%= l.text_field :difficulty %>
<% end %>
<% end %>

Various combinations indentation of person / activities / difficulty in my 
en.yml file didn’t work. So I looked inside rails to see what’s going on.

The relevant code is in 
actionpack-2.3.10/lib/action_view/helpers/form_helper.rb. The method used is
  
def to_label_tag(text = nil, options = {})
on line 758.

And the code doing the work is:
content = if text.blank?
  i18n_label = I18n.t("helpers.label.#{object_name}.#{method_name}", 
:default => “”)
  i18n_label if i18n_label.present?
else
  text.to_s
end

The problem is you end up with a set of labels like:
helpers.label.person[activities_attributes][0].difficulty
helpers.label.person[activities_attributes][1].difficulty
helpers.label.person[activities_attributes][2].difficulty

Is there a way you can put wildcards in YAML? If not, is there some other way 
around this limitation? If not, this seems like a bug in Rails, and I’ll file a 
lighthouse ticket.



Paul

smime.p7s
Description: S/MIME cryptographic signature


[Rails] Re: Re: querying has_many relationships

2010-11-28 Thread Marnen Laibow-Koser
Julian Leviston wrote in post #964556:
> It'd be interesting if AssociationProxy added in pluralised attribute
> names as easy go-to's for mappings, hey?

No.  What would be the point?

>
> for example:
>
> department.courses.course_names
>
> (yields the same result as:...)
>
> department.courses.map{|course| course.course_name}

Why? So you don't have to think about what you're doing?  Or is there a 
good reason that escapes me?

>
>
> --
> Buy my new album! 16 Sep 2010:
> http://itunes.apple.com/au/album/erste-zeit/id393326346

Cool!  Nice to see other musicians here.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
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-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: querying has_many relationships

2010-11-28 Thread Julian Leviston
It'd be interesting if AssociationProxy added in pluralised attribute names as 
easy go-to's for mappings, hey?

for example:

department.courses.course_names

(yields the same result as:...)

department.courses.map{|course| course.course_name}


--
Buy my new album! 16 Sep 2010:
http://itunes.apple.com/au/album/erste-zeit/id393326346







On 29/11/2010, at 8:46 AM, skt wrote:

> I suspect department.courses returns and array and when you print it
> out you get the address of the first entry in the array.
> 
> That would also explain department.courses.course_name would fail
> because you have to index into the department.courses array like
> department.courses[x].course_name to be able to set it
> 
> 
> On Nov 28, 1:07 pm, Bruno Amaral  wrote:
>> I am trying to build a small database of Universities, Departments and
>> Courses. But for some reason I can't seem to get a list of courses
>> attached to a Department.
>> 
>> So far I have the following Database:
>> => Course(id: integer, course_name: string, length: integer,
>> description: text, programme: string, department_id: integer,
>> university_id: integer, created_at: datetime, updated_at: datetime)
>> 
>> => Department(id: integer, department_name: string,
>> department_description: text, head_firstname: string, head_lastname:
>> string, head_email: string, university_id: integer, courses_id:
>> integer, created_at: datetime, updated_at: datetime)
>> 
>> => University(id: integer, name: string, website: string, country:
>> string, city: string, departments_id: integer, courses_id: integer,
>> created_at: datetime, updated_at: datetime)
>> 
>> Models:
>> class Course < ActiveRecord::Base
>> belongs_to :department
>> belongs_to :university
>> end
>> class Department < ActiveRecord::Base
>>   belongs_to :university
>>   has_many :courses
>> end
>> class University < ActiveRecord::Base
>>   has_many :departments
>>   has_many :courses
>> end
>> 
>> For the Department I am trying to run the following controller
>>   def index
>> @departments = Department.includes(:courses, :university)
>> 
>> and the following view:
>> <% @departments.each do |department| %>
>>   
>> <%= department.department_name %>
>> <%= department.department_description %>
>> <%= department.head_firstname %>
>> <%= department.head_lastname %>
>> <%= department.head_email %>
>> <%=department.university.name %>
>> <%= department.courses %>
>> 
>> that last line outputs # and it fails when i try
>> to add something like department.courses.course_name
>> 
>> I am at a loss here and haven't been able to find any clues on the
>> documentation as to what I might be doing wrong. If anyone could at
>> least point me in the right direction, that would be great.
> 
> -- 
> 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.
> 

-- 
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] session active_record_store

2010-11-28 Thread Mustafa C.
Hi,
There doesn't seem to be any previous posts about this problem, I must
be
setting things up wrongly at very basics...

Firstly, the problem... I can't get session[] to persist with
active_record_store. I enabled (config.action_controller.session_store =
:active_record_store) in environment.rb and created the sessions table
at my MySQL database. When I do a session[:blah] = "blah" at the
controller, it does save it (encrypted/scrambled) in the DB, but it
doesn't persist in the session hash when I attempt to retrieve
session[:blah] later on.

I believe Rails/Rack somehow believes all my sessions are coming from a
different browser, does anyone have any clue?

I tried to use memcache store and dalli store as well, they failed at
"key too long" problem at the page load time, which also doesn't have
any previous posts on these forums... So I gave that up and am trying to
solve the above active_record issue as I need to move away from my
current Cookie based session store. I am at Rails 2.3.8.

Thanks for any insights,

-- 
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-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: converting xml to a OpenStruct

2010-11-28 Thread Marnen Laibow-Koser
Rajinder Yadav wrote in post #964515:
> Hi just wondering if there is a easy way to turn an xml entity into a
> object like of type OpenStruct where i can access everything like a
> property?
>
> It's kind of like parsing xml, I already know about nokogiri, but I want
> to work is a OpenStruct and not a DOM object, does that make sense? =P

Not really.  But if I understand you correctly, you will probably want 
to look at HttParty and Crack.

>
> --
> Kind Regards,
> Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely
>

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-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] Hello! 2010.11.29.8.17

2010-11-28 Thread Sridhar Golyandla





Dear potential partner,Do you need
famous brand of electronic products with original quality and international
warranty? Do you want to start your own business career for money making ? What
ever you are a small personal business or largest wholesale entity we also can
provide your support to be our stable customers or agent.We are largest
wholesale business on consumming electronic products between America&China,
laptops, Digital camera Videos,GPS,cellphone,mp4,game console and many other
electronic products.which market is mainly in Europe,America,south
Asia,Australia and Southen America.There is much profit for you if you are our
stable customer or agent.For more information please contact as bellow : 

WEB :  http://www.t1eshop.com#518/img58_qtr.jpg";>t1eshop.com


2010.11.29.8.17

-- 
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: Password Strength Meter, Password Strength Validation

2010-11-28 Thread Nitin P.
Hello,

Another example of a password strength checker. This is a server side 
implementation


http://www.meosys.com/WEB/webdemo.iface

-- 
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-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] rspec-2.2 is released!

2010-11-28 Thread David Chelimsky
### rspec-core-2.2.0

[full changelog](http://github.com/rspec/rspec-core/compare/v2.1.0...master)

* Deprecations/changes
  * --debug/-d on command line is deprecated and now has no effect
  * win32console is now ignored; Windows users must use ANSICON for color 
support
(Bosko Ivanisevic)

* Enhancements
  * Raise exception with helpful message when rspec-1 is loaded alongside
rspec-2 (Justin Ko)
  * debugger statements _just work_ as long as ruby-debug is installed
* otherwise you get warned, but not fired
  * Expose example.metadata in around hooks
  * Performance improvments (see 
[Upgrade.markdown](https://github.com/rspec/rspec-core/blob/master/Upgrade.markdown))

* Bug fixes
  * Make sure --fail-fast makes it across drb
  * Pass -Ilib:spec to rcov

### rspec-mocks-2.2.0

[full changelog](http://github.com/rspec/rspec-mocks/compare/v2.1.0...v2.2.0)

* Enhancements
  * Added "rspec/mocks/standalone" for exploring the rspec-mocks in irb.

* Bug fix
  * Eliminate warning on splat args without parens (Gioele Barabucci)
  * Fix bug where obj.should_receive(:foo).with(stub.as_null_object) would  


pass with a false positive.

### rspec-rails-2.2.0

[full changelog](http://github.com/rspec/rspec-rails/compare/v2.1.0...master)

* Enhancements
  * Added stub_template in view specs

* Bug fixes
  * Properly include helpers in views (Jonathan del Strother)
  * Fix bug in which method missing led to a stack overflow
  * Fix stack overflow in request specs with open_session
  * Fix stack overflow in any spec when method_missing was invoked
  * Add gem dependency on rails ~> 3.0.0 (ensures bundler won't install
rspec-rails-2 with rails-2 apps).

-- 
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] Error creating model object using accepts_nested_attributes_for

2010-11-28 Thread skt
Folks,

I am on Rails 2.3.8. I have models declared as below

class GradeSection < ActiveRecord::Base
  has_many  :class_calendars
  
end

class ClassCalendar < ActiveRecord::Base
  has_many :uploaded_attachments, :class_name => 'UploadedAttachment'
  accepts_nested_attributes_for :uploaded_attachments
  belongs_to  :grade_section
end

class UploadedAttachment < ActiveRecord::Base
  belongs_to :class_calendar
  has_attached_file :phile,
:url => "/assets/class_cal/:id/:style/:basename.:extension"
end

In my create function in GradeSection controller I get data posted as
such

Processing GradeSectionController#create (for 127.0.0.1 at 2010-11-27
22:13:46) [POST]
  Parameters:
{"authenticity_token"=>"fwdgGanIsScNQUcm6sYc952xhT2BSVH6LXggOJdxhKo=",
"class_calendar"=>{"dt"=>"Mon Dec 13 2010 22:13:35 GMT-0800 (Paci
fic Standard Time)", "summary"=>"", "grade_section_id"=>"1",
"chkproj"=>"0", "uploaded_attachments"=>{"name"=>"Test 2"},
"chkhw"=>"1"}}

"name" is a string field for filename in UploadedAttachments model (I
am going to use that model for storing uploaded attachments but taking
incremental steps - getting just the name for now) and
grade_section_id is passed in so I create the model through
ClassCalendar

When I get the above posted data, in the create function of
GradeSectionController, I create a ClassCalendar object from params
that are submitted as below

 @cc = ClassCalendar.new(params[:class_calendar])  # line 96 in the
code

But this line gives me the following error

#= Error Message ===
ActiveRecord::AssociationTypeMismatch (UploadedAttachment(#90313070)
expected, got Array(#1200170)):
  app/controllers/grade_section_controller.rb:96:in `new'
  app/controllers/grade_section_controller.rb:96:in `create'
  c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/lib/ruby-
debug.rb:101:in `debug_load'
  c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/lib/ruby-
debug.rb:101:in `debug_program'
  c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-ide-0.4.5/bin/rdebug-ide:
82
  c:\ruby\bin\rdebug-ide:19:in `load'
  c:\ruby\bin\rdebug-ide:19
  -e:2:in `load'
  -e:2
#= end error message ===

I may be missing something very simple but I don't understand the
error and don't quite know how to debug this - getting an Array
instead of UploadedAttachment. Looking for help with any pointers on
what the issue is and how to debug such errors.

Thanks,
-S

-- 
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: querying has_many relationships

2010-11-28 Thread Bruno Amaral
Skt, Fred, Collin, thank you!

The following code was enough to get the view working:

 <% department.courses.each do |course| %>
 <%= course.course_name %>
 <% end %>

I am very new to both ruby and rails so I tend to miss a few key
concepts, as was the case.

Thank you again :)


On Nov 28, 9:48 pm, Colin Law  wrote:
> On 28 November 2010 21:07, Bruno Amaral  wrote:
>
>
>
>
>
> > I am trying to build a small database of Universities, Departments and
> > Courses. But for some reason I can't seem to get a list of courses
> > attached to a Department.
>
> > So far I have the following Database:
> > => Course(id: integer, course_name: string, length: integer,
> > description: text, programme: string, department_id: integer,
> > university_id: integer, created_at: datetime, updated_at: datetime)
>
> > => Department(id: integer, department_name: string,
> > department_description: text, head_firstname: string, head_lastname:
> > string, head_email: string, university_id: integer, courses_id:
> > integer, created_at: datetime, updated_at: datetime)
>
> > => University(id: integer, name: string, website: string, country:
> > string, city: string, departments_id: integer, courses_id: integer,
> > created_at: datetime, updated_at: datetime)
>
> > Models:
> > class Course < ActiveRecord::Base
> >        belongs_to :department
> >        belongs_to :university
>
> You don't need course belongs_to university, because course belongs_to
> department and department belongs_to university.  So the university
> for a course is course.department.university.  That is on the
> assumption that the university the course belongs to is the same one
> that it's department belongs to.
>
>
>
>
>
> > end
> > class Department < ActiveRecord::Base
> >  belongs_to :university
> >  has_many :courses
> > end
> > class University < ActiveRecord::Base
> >  has_many :departments
> >  has_many :courses
> > end
>
> > For the Department I am trying to run the following controller
> >  def index
> >   �...@departments = Department.includes(:courses, :university)
>
> > and the following view:
> > <% @departments.each do |department| %>
> >  
> >    <%= department.department_name %>
> >    <%= department.department_description %>
> >    <%= department.head_firstname %>
> >    <%= department.head_lastname %>
> >    <%= department.head_email %>
> >    <%=     department.university.name %>
> >    <%= department.courses %>
>
> > that last line outputs # and it fails when i try
> > to add something like department.courses.course_name
>
> I see Fred has pointed out the problem here already.
>
> Colin
>
>
>
>
>
> > I am at a loss here and haven't been able to find any clues on the
> > documentation as to what I might be doing wrong. If anyone could at
> > least point me in the right direction, that would be great.
>
> > --
> > 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 
> > athttp://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-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] querying has_many relationships

2010-11-28 Thread Colin Law
On 28 November 2010 21:07, Bruno Amaral  wrote:
> I am trying to build a small database of Universities, Departments and
> Courses. But for some reason I can't seem to get a list of courses
> attached to a Department.
>
> So far I have the following Database:
> => Course(id: integer, course_name: string, length: integer,
> description: text, programme: string, department_id: integer,
> university_id: integer, created_at: datetime, updated_at: datetime)
>
> => Department(id: integer, department_name: string,
> department_description: text, head_firstname: string, head_lastname:
> string, head_email: string, university_id: integer, courses_id:
> integer, created_at: datetime, updated_at: datetime)
>
> => University(id: integer, name: string, website: string, country:
> string, city: string, departments_id: integer, courses_id: integer,
> created_at: datetime, updated_at: datetime)
>
> Models:
> class Course < ActiveRecord::Base
>        belongs_to :department
>        belongs_to :university

You don't need course belongs_to university, because course belongs_to
department and department belongs_to university.  So the university
for a course is course.department.university.  That is on the
assumption that the university the course belongs to is the same one
that it's department belongs to.

> end
> class Department < ActiveRecord::Base
>  belongs_to :university
>  has_many :courses
> end
> class University < ActiveRecord::Base
>  has_many :departments
>  has_many :courses
> end
>
> For the Department I am trying to run the following controller
>  def index
>   �...@departments = Department.includes(:courses, :university)
>
> and the following view:
> <% @departments.each do |department| %>
>  
>    <%= department.department_name %>
>    <%= department.department_description %>
>    <%= department.head_firstname %>
>    <%= department.head_lastname %>
>    <%= department.head_email %>
>    <%=     department.university.name %>
>    <%= department.courses %>
>
> that last line outputs # and it fails when i try
> to add something like department.courses.course_name

I see Fred has pointed out the problem here already.

Colin

>
> I am at a loss here and haven't been able to find any clues on the
> documentation as to what I might be doing wrong. If anyone could at
> least point me in the right direction, that would be great.
>
> --
> 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.
>
>

-- 
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: querying has_many relationships

2010-11-28 Thread skt
I suspect department.courses returns and array and when you print it
out you get the address of the first entry in the array.

That would also explain department.courses.course_name would fail
because you have to index into the department.courses array like
department.courses[x].course_name to be able to set it


On Nov 28, 1:07 pm, Bruno Amaral  wrote:
> I am trying to build a small database of Universities, Departments and
> Courses. But for some reason I can't seem to get a list of courses
> attached to a Department.
>
> So far I have the following Database:
> => Course(id: integer, course_name: string, length: integer,
> description: text, programme: string, department_id: integer,
> university_id: integer, created_at: datetime, updated_at: datetime)
>
> => Department(id: integer, department_name: string,
> department_description: text, head_firstname: string, head_lastname:
> string, head_email: string, university_id: integer, courses_id:
> integer, created_at: datetime, updated_at: datetime)
>
> => University(id: integer, name: string, website: string, country:
> string, city: string, departments_id: integer, courses_id: integer,
> created_at: datetime, updated_at: datetime)
>
> Models:
> class Course < ActiveRecord::Base
>         belongs_to :department
>         belongs_to :university
> end
> class Department < ActiveRecord::Base
>   belongs_to :university
>   has_many :courses
> end
> class University < ActiveRecord::Base
>   has_many :departments
>   has_many :courses
> end
>
> For the Department I am trying to run the following controller
>   def index
>     @departments = Department.includes(:courses, :university)
>
> and the following view:
> <% @departments.each do |department| %>
>   
>     <%= department.department_name %>
>     <%= department.department_description %>
>     <%= department.head_firstname %>
>     <%= department.head_lastname %>
>     <%= department.head_email %>
>     <%=    department.university.name %>
>     <%= department.courses %>
>
> that last line outputs # and it fails when i try
> to add something like department.courses.course_name
>
> I am at a loss here and haven't been able to find any clues on the
> documentation as to what I might be doing wrong. If anyone could at
> least point me in the right direction, that would be great.

-- 
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: querying has_many relationships

2010-11-28 Thread Frederick Cheung


On Nov 28, 9:07 pm, Bruno Amaral  wrote:

>     <%= department.courses %>
>
> that last line outputs # and it fails when i try
> to add something like department.courses.course_name
>
> I am at a loss here and haven't been able to find any clues on the
> documentation as to what I might be doing wrong. If anyone could at
> least point me in the right direction, that would be great.

Because department.courses is a collection of courses and doesn't have
a course_name attribute (although the objects in that collection will
do). You either need to pick which course you want to manipulate all
iterate over them (similarly, you can't do
@departments.department_name - you had to iterate over the departments
in that collection)

Fred

-- 
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] querying has_many relationships

2010-11-28 Thread Bruno Amaral
I am trying to build a small database of Universities, Departments and
Courses. But for some reason I can't seem to get a list of courses
attached to a Department.

So far I have the following Database:
=> Course(id: integer, course_name: string, length: integer,
description: text, programme: string, department_id: integer,
university_id: integer, created_at: datetime, updated_at: datetime)

=> Department(id: integer, department_name: string,
department_description: text, head_firstname: string, head_lastname:
string, head_email: string, university_id: integer, courses_id:
integer, created_at: datetime, updated_at: datetime)

=> University(id: integer, name: string, website: string, country:
string, city: string, departments_id: integer, courses_id: integer,
created_at: datetime, updated_at: datetime)

Models:
class Course < ActiveRecord::Base
belongs_to :department
belongs_to :university
end
class Department < ActiveRecord::Base
  belongs_to :university
  has_many :courses
end
class University < ActiveRecord::Base
  has_many :departments
  has_many :courses
end

For the Department I am trying to run the following controller
  def index
@departments = Department.includes(:courses, :university)

and the following view:
<% @departments.each do |department| %>
  
<%= department.department_name %>
<%= department.department_description %>
<%= department.head_firstname %>
<%= department.head_lastname %>
<%= department.head_email %>
<%= department.university.name %>
<%= department.courses %>

that last line outputs # and it fails when i try
to add something like department.courses.course_name

I am at a loss here and haven't been able to find any clues on the
documentation as to what I might be doing wrong. If anyone could at
least point me in the right direction, that would be great.

-- 
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] Implementing the MetaWeblog API

2010-11-28 Thread Tom S.
As a "good programmer", I want to make my blog software support the next
generation of Rails. I've thoroughly enjoyed working with the new ideas
of Rails 3, but I have come to a major roadblock: All of the examples
I've found that deal with implementing the API use ActionWebService,
which has been deprecated and lacks major support from the Rails core
team.

Has anyone out there added MetaWeblog API support to their Rails 3
application? What did you do to
solve this problem? How did you implement the actual functions in the
API? Currently, I'm working on a solution that involves a Sinatra (or
possibly some other kind of) middleware app that is mapped
to a certain endpoint ('/blog/api') where clients send/receive XML-RPC
data.

-- 
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-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] converting xml to a OpenStruct

2010-11-28 Thread Rajinder Yadav
Hi just wondering if there is a easy way to turn an xml entity into a 
object like of type OpenStruct where i can access everything like a 
property?


It's kind of like parsing xml, I already know about nokogiri, but I want 
to work is a OpenStruct and not a DOM object, does that make sense? =P


--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1

--
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: Re: editors available for designing for ror..

2010-11-28 Thread Marnen Laibow-Koser
David Kahn wrote in post #964465:
> On Sun, Nov 28, 2010 at 3:39 AM, Colin Law 
> wrote:
>
>>
> Colin - do you find it to be fast enough -- I think I looked at it but
> did
> not go further because I saw it is written in java and I guess I have
> heard
> enough about slow java apps

Don't let silly biases get in your way.  Java's performance is fine for 
most real-world applications.  jEdit is plenty fast enough.  I've 
stopped using it for reasons of usability, not performance.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

-- 
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-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: How to create a mail service like gmail using ror

2010-11-28 Thread pepe
> Actually i am a bit new to the development side.
> and new to ror as well.but i want to learn Ruby on Rails and start my
> web development. i want to build a real time application while
> learning..can u guide me pls...

Hi there,

First of all I would get familiar with Ruby, which is VERY important
and you don't need to know any Rails to have some fun with it. Pay
special attention to blocks. Then I would try to understand the MVC
design pattern, Rails is based on it and will help you tremendously in
understanding how things work and why the application looks so 'spread
out' in different folders and files. Then I would try to build
something really simple like a "Hello World" type of application,
there are many tutorials out there. If you're happy and want to keep
going then I would try to learn how to use activerecord, which will be
immensely helpful working with any DB. Then you should have enough
information to start building your real time application. IMHO, if you
miss any of the above you're in for a rough start (personal
experience ;) ).

-- 
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: editors available for designing for ror..

2010-11-28 Thread dsadaka
I vote for TextPad on Windows.  You can download a syntax file for
color coding, it was a file explorer built in, which works well with
the Rails directory structure.  I also use the "Find in Files" option
often.


Of course, I've been using TextPad for over 15 years so I might be a
bit biased.

On Nov 28, 9:57 am, Colin Law  wrote:
> On 28 November 2010 14:41, David Kahn  wrote:
>
>
>
>
>
> > On Sun, Nov 28, 2010 at 3:39 AM, Colin Law  wrote:
>
> >> On 28 November 2010 02:11, Marnen Laibow-Koser 
> >> wrote:
> >> > Andre Joseph Cubeta wrote in post #964087:
> >> >> +1 Edmond, hehe
>
> >> >> @Emmanuel - go for Textmate for a good start if you're a Mac user,
>
> >> > Or save the €80 and try KomodoEdit.
>
> >> I like jEdit, which is also free and available on all platforms.
>
> > Colin - do you find it to be fast enough -- I think I looked at it but did
> > not go further because I saw it is written in java and I guess I have heard
> > enough about slow java apps by any chance have you also used textmate
> > and can compare it?
>
> jEdit does not seem slow to me (on Ubuntu), certainly comparable to
> codewright on windows which I used to use.  I have a four year old
> laptop and it runs fine.  There are lots of good plugins.  You need
> the project viewer for managing sets of files as a project (a rails
> app for example) and sidekick which does ruby parsing, method index
> and so on.  It has built in ruby syntax colouring.
>
> Colin

-- 
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: has_one accepts_nested_attributes_for fields_for NOT WORKING HELP

2010-11-28 Thread ssmithstone
in your

def new

try @user.address = Address.new

On Nov 28, 4:50 pm, Humberto Ribeiro  wrote:
> Model address has 8 attributes... i did it to minimize user table
> size.
>
> About the problem... just try in your machine you will se it not
> workin as should do.
>
> On 28 nov, 13:41, Walter Lee Davis  wrote:
>
>
>
>
>
>
>
> > On Nov 28, 2010, at 11:29 AM, Humberto Ribeiro wrote:
>
> > > MODEL
> > > class User < ActiveRecord::Base
> > >  has_one :address, :dependent => :destroy
> > >  accepts_nested_attributes_for :address
> > > end
>
> > > CONTROL
> > >  def new
> > >   �...@user = User.new
> > >   �...@user.build_address  # Adicionei
> > >  ...
>
> > > VIEW partial _form
> > > 
> > > <% f.fields_for :address do |b| %>     # Adicionei
> > >    <%= b.text_field :city_manual %>    # Adicionei
> > > <% end %>                                        # Adicionei
> > > 
>
> > > So this is not working... when browser to users/new it do not show the
> > > field as should...
> > > Change this to a has_many all works.
> > > Using has_one this make me crazy and not work... anyone help?
>
> > Sorry, I don't have an answer for you on this. But I'm curious -- why  
> > are you putting the address in a separate model if you are using  
> > has_one? It seems like an over-normailization to me. Why not just put  
> > those attributes in the user and be done with it?
>
> > Walter

-- 
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: editors available for designing for ror..

2010-11-28 Thread Agoofin
I've used NetBeans on Linux and Windows and was happy with it.

Aptana is very good for RoR dev with GIT integration

On the horizon is Redcar an IDE written in Ruby that lists TextMate as
a major inspiration.

On Nov 26, 5:58 am, Emanuel  wrote:
> can anybody tell me wat are the editors available for developing web
> pages(/static pages) for the rails application

-- 
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: I have a NoMethodError, please help!

2010-11-28 Thread Oknek Jeanr
I Like to order ugg boots,they are 100% original,
and they are very cheap and good secvice,
Non Tax,Free Shipping.
if you like it,you can buy it from
this company.
www uggscom com
really?

-- 
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-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: Authlogic with Rails3 where to start?

2010-11-28 Thread Ray Parker
+1 -- was with AL and now use Devise for what I do.

On Nov 28, 10:37 am, Vladimir Rybas  wrote:
> >  Which do you suggest?
>
> Devise is ok for Rails 3. Watch 
> screencasts:http://railscasts.com/episodes?search=devise
>
>
>
>
>
>
>
> On Sun, Nov 28, 2010 at 4:20 PM, Gerő Zoltán  wrote:
> > Hello,
> > I started to play with Authlogic, and the official Github source seems only
> > Rails2, as Railscasts also.
> > Do you know any source of how to use Authlogic in Rails3 app?
> > Or maybe it's out of date, and I should try other solutions? Which do you
> > suggest?
> > Thanks,
> > Zoltán
>
> > --
> > 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.

-- 
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: has_one accepts_nested_attributes_for fields_for NOT WORKING HELP

2010-11-28 Thread Humberto Ribeiro
Model address has 8 attributes... i did it to minimize user table
size.

About the problem... just try in your machine you will se it not
workin as should do.

On 28 nov, 13:41, Walter Lee Davis  wrote:
> On Nov 28, 2010, at 11:29 AM, Humberto Ribeiro wrote:
>
>
>
>
>
> > MODEL
> > class User < ActiveRecord::Base
> >  has_one :address, :dependent => :destroy
> >  accepts_nested_attributes_for :address
> > end
>
> > CONTROL
> >  def new
> >   �...@user = User.new
> >   �...@user.build_address  # Adicionei
> >  ...
>
> > VIEW partial _form
> > 
> > <% f.fields_for :address do |b| %>     # Adicionei
> >    <%= b.text_field :city_manual %>    # Adicionei
> > <% end %>                                        # Adicionei
> > 
>
> > So this is not working... when browser to users/new it do not show the
> > field as should...
> > Change this to a has_many all works.
> > Using has_one this make me crazy and not work... anyone help?
>
> Sorry, I don't have an answer for you on this. But I'm curious -- why  
> are you putting the address in a separate model if you are using  
> has_one? It seems like an over-normailization to me. Why not just put  
> those attributes in the user and be done with it?
>
> Walter

-- 
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_one accepts_nested_attributes_for fields_for NOT WORKING HELP

2010-11-28 Thread Walter Lee Davis


On Nov 28, 2010, at 11:29 AM, Humberto Ribeiro wrote:



MODEL
class User < ActiveRecord::Base
 has_one :address, :dependent => :destroy
 accepts_nested_attributes_for :address
end

CONTROL
 def new
   @user = User.new
   @user.build_address  # Adicionei
 ...

VIEW partial _form

<% f.fields_for :address do |b| %>  # Adicionei
   <%= b.text_field :city_manual %># Adicionei
<% end %># Adicionei


So this is not working... when browser to users/new it do not show the
field as should...
Change this to a has_many all works.
Using has_one this make me crazy and not work... anyone help?


Sorry, I don't have an answer for you on this. But I'm curious -- why  
are you putting the address in a separate model if you are using  
has_one? It seems like an over-normailization to me. Why not just put  
those attributes in the user and be done with it?


Walter

--
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: invalid date

2010-11-28 Thread Humberto Ribeiro

maybe you in windows right?
it was happening with me on windows ... so i loaded an linux
virtualbox and all works fine...
till now i didnt found any solution to make it works in windows...
if you find please tellme

-- 
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_one accepts_nested_attributes_for fields_for NOT WORKING HELP

2010-11-28 Thread Humberto Ribeiro

MODEL
class User < ActiveRecord::Base
  has_one :address, :dependent => :destroy
  accepts_nested_attributes_for :address
end

CONTROL
  def new
@user = User.new
@user.build_address  # Adicionei
  ...

VIEW partial _form

<% f.fields_for :address do |b| %># Adicionei
<%= b.text_field :city_manual %># Adicionei
<% end %># Adicionei


So this is not working... when browser to users/new it do not show the
field as should...
Change this to a has_many all works.
Using has_one this make me crazy and not work... anyone help?

-- 
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] NameError - any pointer on how to track down problem

2010-11-28 Thread Hassan Schroeder
On Fri, Nov 26, 2010 at 3:32 AM, Ewen  wrote:
> I'm trying to put Spree 0.30.1 on Heroku and I'm getting the following
> error message (from the heroku logs);
>
> NameError (undefined local variable or method 'auth_user' for
> #):

1. Does your app run locally in production mode?
2. Is whatever supplies 'auth_user' specified in your .gems file?
3. Does your Heroku DB match your local DB, either through having
run all migrations or doing `heroku db:push` ?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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] Authlogic with Rails3 where to start?

2010-11-28 Thread Vladimir Rybas
>  Which do you suggest?

Devise is ok for Rails 3. Watch screencasts:
http://railscasts.com/episodes?search=devise


On Sun, Nov 28, 2010 at 4:20 PM, Gerő Zoltán  wrote:
> Hello,
> I started to play with Authlogic, and the official Github source seems only
> Rails2, as Railscasts also.
> Do you know any source of how to use Authlogic in Rails3 app?
> Or maybe it's out of date, and I should try other solutions? Which do you
> suggest?
> Thanks,
> Zoltán
>
> --
> 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.
>

-- 
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: editors available for designing for ror..

2010-11-28 Thread Colin Law
On 28 November 2010 14:41, David Kahn  wrote:
>
>
> On Sun, Nov 28, 2010 at 3:39 AM, Colin Law  wrote:
>>
>> On 28 November 2010 02:11, Marnen Laibow-Koser 
>> wrote:
>> > Andre Joseph Cubeta wrote in post #964087:
>> >> +1 Edmond, hehe
>> >>
>> >> @Emmanuel - go for Textmate for a good start if you're a Mac user,
>> >
>> > Or save the €80 and try KomodoEdit.
>>
>> I like jEdit, which is also free and available on all platforms.
>
> Colin - do you find it to be fast enough -- I think I looked at it but did
> not go further because I saw it is written in java and I guess I have heard
> enough about slow java apps by any chance have you also used textmate
> and can compare it?

jEdit does not seem slow to me (on Ubuntu), certainly comparable to
codewright on windows which I used to use.  I have a four year old
laptop and it runs fine.  There are lots of good plugins.  You need
the project viewer for managing sets of files as a project (a rails
app for example) and sidekick which does ruby parsing, method index
and so on.  It has built in ruby syntax colouring.

Colin

-- 
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: editors available for designing for ror..

2010-11-28 Thread David Kahn
On Sun, Nov 28, 2010 at 3:39 AM, Colin Law  wrote:

> On 28 November 2010 02:11, Marnen Laibow-Koser 
> wrote:
> > Andre Joseph Cubeta wrote in post #964087:
> >> +1 Edmond, hehe
> >>
> >> @Emmanuel - go for Textmate for a good start if you're a Mac user,
> >
> > Or save the €80 and try KomodoEdit.
>
> I like jEdit, which is also free and available on all platforms.
>

Colin - do you find it to be fast enough -- I think I looked at it but did
not go further because I saw it is written in java and I guess I have heard
enough about slow java apps by any chance have you also used textmate
and can compare it?

>
> Colin
>
> --
> 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.
>
>

-- 
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: rails server command

2010-11-28 Thread Walton Hoops
On 11/27/2010 10:28 AM, Paul Roche wrote:
> Ah, I created a new app, specific to the new ruby version. When I try 
> and run the server I get an error mesasge. Please find attached
>
> Attachments:
> http://www.ruby-forum.com/attachment/5468/error.JPG
>
>
The punchline is your version of sqlite3.dll is not the same version
that the sqlite3 gem on your system was compiled against. You'll have to
look at the homepage for the Sqlite3 gem to determine the proper version
of Sqlite3 dll to download.

That said, I saw on an earlier post that you are using Instant Rails.  I
strongly advise against it.  Instant Rails is years out of date and has
long since ceased to be supported.  Instead I'd recommend downloading
1.9.2 from http://rubyinstaller.org/ and installing Rails 3 the normal
way (gem install rails).  This will give you a setup that is known to
work, and as a bonus, IIRC the sqlite3 gem compiled for that version of
Ruby includes the correct dll in it's distribution.   Ruby Installer
also provides an addon called DevKit
(http://rubyinstaller.org/add-ons/devkit/) which will make it much
easier to install C based addons that would be a nightmare in Instant Rails.

-- 
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: Re: I have a NoMethodError, please help!

2010-11-28 Thread Zack Nathan
Colin Law wrote in post #964458:
> On 28 November 2010 12:31, Zack Nathan  wrote:
>> [...]
>> I scaffolded it. Im using rails 2.3.8. Sorry I meant that my controller
>> is named singularly. So do you guys think I should pluralize it?
>>
>
> Model should be Repository in repository.rb
> Controller should be RepositoriesController in
> repositories_controller.rb
>
> Colin

alrighty, thanks!

-- 
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-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] Authlogic with Rails3 where to start?

2010-11-28 Thread Gerő Zoltán
Hello,

I started to play with Authlogic, and the official Github source seems only
Rails2, as Railscasts also.

Do you know any source of how to use Authlogic in Rails3 app?
Or maybe it's out of date, and I should try other solutions? Which do you
suggest?

Thanks,
Zoltán

-- 
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: I have a NoMethodError, please help!

2010-11-28 Thread Colin Law
On 28 November 2010 12:31, Zack Nathan  wrote:
> [...]
> I scaffolded it. Im using rails 2.3.8. Sorry I meant that my controller
> is named singularly. So do you guys think I should pluralize it?
>

Model should be Repository in repository.rb
Controller should be RepositoriesController in repositories_controller.rb

Colin

-- 
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: I have a NoMethodError, please help!

2010-11-28 Thread Zack Nathan
Zoltan Gero wrote in post #964442:
> Hello,
> I read the whole mailing, and not sure if I agree.
>
> So first this problem means you don't have the method in the
> Controller. I agree, controllers have naming conventions, check those.
> Also routes.rb has conventions, depends on version - which do you use?
>
> If you've written your route to the file, you can check if it's
> available from command line:
> rake routes
> Here you will see the url path and the pathname also, so will be
> visible if you gave it wrong.
>
> Which versions do you use? Did you scaffolded or created part by part?
> cheers,
> Zoltn

I scaffolded it. Im using rails 2.3.8. Sorry I meant that my controller 
is named singularly. So do you guys think I should pluralize it?

Thanks,

jakx12.

-- 
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-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] gem update --system returns error

2010-11-28 Thread Alex Jawad
Hi guys,

First off, I am completely new to programming and hence obviously also
to both Ruby and RoR. Please do bare with me. Yoroshiku onegaishimasu!

I am having trouble understanding what to do when the following error
appears when I try to update RubyGems:

C:\InstantRails\rails_apps\gem update -- system
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml

I am using instructions as composed by Patrick Lenz in Simply Rails 2.
I'm on Windows Vista SP1.

Thanks in advance!

Alex

-- 
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-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] group_by Speed Question

2010-11-28 Thread Ray Parker
I have in my app's database about 350 'Programs'.  The following code
runs in the blink of an eye in the console, but takes for-freakin-ever
when in a controller (or the view, for fragment caching):

 programs = Program.order(:name).
@program_groups = programs.group_by{|p| p.name[0, 1]}

Any 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] Re: Adding date into entries when I do scaffolding [beginner question]

2010-11-28 Thread gezope
Hello,

time:date or time:datetime, depends on which type of data do you want
to hold in your database.

Check also how to create a migration whihc change your model and
database structure:
http://guides.rubyonrails.org/migrations.html

Preferabyl go through a tutorial, you wwill know the differences
between generators also, now only scaffolding. And check the files
which created by scaffold generator.

cheers,
Zoltán

On nov. 26, 23:54, JK  wrote:
> So I would like to add time as an attribute of my Submission using
> scaffolding. What is the code I should use to replace  part?
>
> rails generate scaffold Submission title:string describtion:text
> email:string category:string time:??

-- 
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: editors available for designing for ror..

2010-11-28 Thread Irfan Ahmed
hay I found myself, Gedit is the best..if u know how use its file explorer u
will have fun, I was using kate at the first time, now I file, Gedit is the
best :)

On Sun, Nov 28, 2010 at 4:03 PM, gezope  wrote:

> Hello,
>
> if I understood well your question was not about Rails editor, it was
> about a good "static page creator" or generator?
>
> Try Haml with Sass!
>
> Or try out Sinatra if you need small page, and also check the long
> list about good generators, both are amazing!!
> https://github.com/sinatra/sinatra
>
> Good luck,
> Zoltán
>
> On nov. 26, 10:58, Emanuel  wrote:
> > can anybody tell me wat are the editors available for developing web
> > pages(/static pages) for the rails application
>
> --
> 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.
>
>


-- 
Thanks,
Irfan Ahmed Rizvi
http://www.welltreat.us
+880 1676  246  991
+880 1723  712  288

-- 
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: editors available for designing for ror..

2010-11-28 Thread gezope
Hello,

if I understood well your question was not about Rails editor, it was
about a good "static page creator" or generator?

Try Haml with Sass!

Or try out Sinatra if you need small page, and also check the long
list about good generators, both are amazing!!
https://github.com/sinatra/sinatra

Good luck,
Zoltán

On nov. 26, 10:58, Emanuel  wrote:
> can anybody tell me wat are the editors available for developing web
> pages(/static pages) for the rails application

-- 
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: Can't get past rake db:create, guidance appreciated

2010-11-28 Thread gezope
Hello,

Check all versions, I assume everything is updated, Ruby1.9 Rails 3+
Gem 1.3.7

This error can mean:
1. your Ruby and Gem version isn't fit, update;
2. Your Gemfile contains the line gem 'sqlite3' ... but your gem list
does not - check it from command line 'gem list'. If you want to use
sqlite3 later (good choice) then type 'gem install sqlite3-ruby'
This way your system will have sqlite3 gem, which means later you can
use 'bundle install' (if you wrote it to the Gemfile...)
Anyway first also check if the DBs works properly from console.

I think the same with postgre.

Let me know if you have further problems, but then pls copy-paste here
your versions and OS and gemlist.
good luck,
Zoltán


On nov. 26, 05:02, Adrian Berg  wrote:
> $ rake db:create
> (in /home/adrian/sites/tmpee)
> Could not find gem 'sqlite3-ruby (>= 0, runtime)' in any of the gem
> sources listed in your Gemfile.
> Try running `bundle install`.
>
> So I ran bundle install and got the same error.
>
> This is my config/database.yml file:
>
> development:
>   adapter: postgresql
>   encoding: unicode
>   database: tmpees.development
>   pool: 5
>   timeout: 5000
>
> # Warning: The database defined as "test" will be erased and
> # re-generated from your development database when you run "rake".
> # Do not set this db to the same as development or production.
> test:
>   adapter: postgresql
>   database: tmpees.test
>   pool: 5
>   timeout: 5000
>
> production:
>   adapter: postgresql
>   database: tmpees.production
>   pool: 5
>   timeout: 5000
>
> Thank you for your patience with a noob.

-- 
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: I have a NoMethodError, please help!

2010-11-28 Thread gezope
Hello,
I read the whole mailing, and not sure if I agree.

So first this problem means you don't have the method in the
Controller. I agree, controllers have naming conventions, check those.
Also routes.rb has conventions, depends on version - which do you use?

If you've written your route to the file, you can check if it's
available from command line:
rake routes
Here you will see the url path and the pathname also, so will be
visible if you gave it wrong.

Which versions do you use? Did you scaffolded or created part by part?
cheers,
Zoltán

On nov. 27, 20:43, Zack Nathan  wrote:
> Hey everyone,
>
> I get this error for some reason when trying to access my new action.
> Here's the error:
> undefined method `repositories_path' for #
>
> Heres my view code:
>
> <% form_for(@repository) do |f| %>
>   <%= f.error_messages %>
>
>   
>     <%= f.label :name %>
>     <%= f.text_field :name %>
>   
>   
>     <%= f.label :owner %>
>     <%= f.text_field :owner %>
>   
>   
>     <%= f.label :private %>
>     <%= f.check_box :private %>
>   
>   
>     <%= f.submit 'Update' %>
>   
> <% end %>
>
> My repository controller is a resources in routes. Whats wrong?!
>
> Thanks,
>
> jakx12.
>
> --
> Posted viahttp://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-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 server command

2010-11-28 Thread gezope
Hello,

your first problem occurs when your not in your app's folder, or if
your ruby or rails version isn't well. The second one is different:
it's about sqlite3.

Please write in cmd:
'ruby -v' should be 1.9
'rails -v' should be 3.+
'gem -v' should be 1.3.7
'gem list' - here you should see sqlite3 on the list - if you want to
use sqlite3, if not, then change it in the database.yaml file.

I highliy recommend you this tutorial:
http://guides.rubyonrails.org/
prefereably then instant Rails.

Good luck,
Zoltán




On nov. 28, 02:08, Brian Troutwine  wrote:
> On Sat, Nov 27, 2010 at 6:57 PM, Paul Roche  wrote:
> > Hi, I'd like to bump this thread if this is ok? My main objective is for
> > people to take a look at this error message I get when running 'rails
> > server'
>
> Have you googled your error message? I found more than a few
> references that professed to have solutions, depending on your
> specific version of Windows.
>
> > Attachments:
> >http://www.ruby-forum.com/attachment/5472/error.JPG
>
> The message is a short one; you will get rather more help by transcribing.
>
>
>
>
>
>
>
> > --
> > Posted viahttp://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-t...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > rubyonrails-talk+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://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-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: editors available for designing for ror..

2010-11-28 Thread Colin Law
On 28 November 2010 02:11, Marnen Laibow-Koser  wrote:
> Andre Joseph Cubeta wrote in post #964087:
>> +1 Edmond, hehe
>>
>> @Emmanuel - go for Textmate for a good start if you're a Mac user,
>
> Or save the €80 and try KomodoEdit.

I like jEdit, which is also free and available on all platforms.

Colin

-- 
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: HAML including CSS and JavaScript

2010-11-28 Thread gezope
Oh yes, your solution is better, thanks Marnen!

On nov. 28, 02:13, Marnen Laibow-Koser  wrote:
> Zoltan Gero wrote in post #964407:
>
> > Hello,
>
> > how to include CSS file with Haml?
>
> Use Rails' stylesheet_link_tag helper.
>
> > Every way I tried puts the href=...
> > infos
> > after the tag, not inside, like:
> > href="style.css" rel="stylesheet" type="text/css"
>
> You need to learn about how to do attributes in Haml (hint: braces are
> involved; read the docs).
>
>
>
> > In reference I onlye read about JavaScript, not any word about CSS. But
> > Javascript also didn't worked, how should make include it?
>
> Same way.
>
> > Thanks in advance,
> > Zoltn
>
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> --
> Posted viahttp://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-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.