Marc C. wrote in post #1061690:
> Except one part: I don't know how to
> render correctly the HTML in the PDF file.
>
> Currently I use the Prawn library to create the PDF's.
I use Prawn to generate pdf's, Nokogiri to parse the html portion and
created an element_to_pdf method to walk the html, l
Msan Msan wrote in post #1061478:
> I've noticed that if I use associations with has_many_and_belongs_to
> and i call a destroy method on an object of the association, the
> record in the join table is automatically deleted.
> If I use has_many :though, for example:
>
> Category
> has_many :categor
akshar jamgaonkar wrote in post #1058608:
> Hi I am new to ruby on rails , i am trying to develop a form client
> form having multiple refrences to country... i.e while adding a client
> i can add two contact persons each have a country associated with
> them. However with scaffolding iam unable to
danimashu wrote in post #997411:
> I would prefer to have a url like that:
> - example.com/ford/red
>
But then what happens with:
- example.com/pink/cadillac ?
I'd be careful of investing any particular logic behind your urls for
dealing with arguments. Do all your users catagorize things th
Femto Zheng wrote in post #996564:
> Hello all, because most of php's application is feature rich than
> rails's existing offer,
> like say, crm solutions, sugarcrm,
> I know rails have similar offering,( fat_free_crm), but unfornately,
> this is really far
> from the feature sugarcrm offers,
> su
amritpal p. wrote in post #995532:
> Then ran "rake
> db:migrate",it created a new columns in table products with name
> "price" ,but i didnt change the view(didnt create a filed with name
> "price")
Migrations don't do that (you can create migrations
amritpal p. wrote in post #995520:
> On Apr 28, 3:25am, Colin Law wrote:
>>
>> > root :to => "say#hello"
>>
>> So you think that the above line, which says route '/' to say#hello'
>> is going to route /say/goodbye somewhere?
> No it will not route to /say/goodbye,but it will route to
amritpal p. wrote in post #995096:
> Yes i have tried scafffolding.But i want to generate a form
> without scaffold.i want to manualy create a controller,view and model
> for it.please help to do it.
>
> Thanks
Yes, fair enough. But use the scaffolded elements as the prototype for
your manual cr
amritpal p. wrote in post #995086:
> Stuff...
You seem to be lacking some fundamental "organizational" knowledge as it
pertains to a Rails application.
What I found very instructive way back when was to scaffold a basic
application and see what Rails created, and how it was organized. Then
I
News Aanad wrote in post #993479:
> hi, I have json string in json request.
> i want to update the database using that string.
> how can i do that?
> There would be a multipal object in this string.
>
> sample string is:
>
>
[{"product":{"amt":300,"created_at":"2011-03-28T05:46:52Z","id":1,"prodnm
amritpal p. wrote in post #993489:
>But i didnt explain in which
> file it should be written?
>
> Thanks
Well, perhaps you would benefit from seeing a scaffolded response. At an
OS prompt, type in:
ruby script/generate scaffold person first_name:string las
Andy Tolle wrote in post #991031:
> For example:
> Currently I have:
> functions < functions_competencies < competencies
> exams < exam_competencies < competencies
>
> I'd like to dry up "functions_competencies" and "exam_competencies" by
> using a polymorphic association, by let's say 'a
Marco Antonio Filho wrote in post #991464:
> Now comes the problem. I need to deploy these
> changes
> in the production servers. I already have the script to update the
> changes,
> but I don't know what is the conventional place to put it. Not in the
> migrations, I know.
Why not a migration? S
Nick Marsh wrote in post #989203:
> That means no clients or anything
Oh but you DO have clients, you just don't know them yet.
Involve elements of your projected user base(s) now, and you might find
a much higher adoption rate later...
--
Posted via http://www.ruby-forum.com/.
--
You receiv
John Merlino wrote in post #989291:
>
> ((@all_resources.size - 1) / @limit).to_i + 1
>
> What does the size method do and why add one at the end?
>
Suppose 100 records, with a page size of 30
num_pages = ((100-1)/30)
num_pages = 99/30
num_pages = 3.3
num_pages = 3 (to_i)
num_pages = 4
3 full pa
bingo bob wrote in post #989039:
> anyone done anything like this before?
What if you select 100 records per pass in an oldest-update ==
first-selected order?
model.Find(:all, :order => "updated_at DESC", :limit => 100)
--
Posted via http://www.ruby-forum.com/.
--
You received this message b
R. K. wrote in post #987926:
> I'm attempting to make a basic CRUD/data entry cookbook. I've got a
> recipe model that is composed of other models. I'm intending of using a
> single form to create the recipes such that n ingredients and n
> instructions can be associated to a single recipe.
>
> I u
Manny 777 wrote in post #987883:
> Hi Fred,
> thank you for your reply. I tried to edit Gemfile by your hint, but
> unfortunatelly, without successful...
>
> But I found one interesting thing -- if I will to delete content of
> Gemfile, my app work normally (but of course, the problem with RMagick
Colin Law wrote in post #987114:
>
> But how fast can you do it?
>
Ooh, that's an evil tweak... (a minor diversion which is much more fun
than what I was doing)
Lenovo T61p, Core2Duo, T9300, 2.5GHz, ruby 1.9.2-p0
= 0.253025
And for curiosity, my Ubuntu 10.10 VM on top of the same hardware:
Colin Law wrote in post #986452:
> On 9 March 2011 11:54, Frederick Cheung
> wrote:
>
> OK, I provided a scope
> scope :all_varieties
> with no parameters.
>
> Then in the controller
> @varieties = Variety.all_varieties
> and have confirmed that if the fragment is already cached so
> @varieties is
rails.n...@gmail.com wrote in post #982493:
> I guess this could also be done by implementing some sort of Fragment
> Cache... wrapping a whole page
>
> Just not sure where to begin... I don't want to reinvent rails
> caching... just want to tweak it with a simple conditional + have
> control on th
rogi wrote in post #981715:
> Hi There
>
> I have a table for the names of my workers and a table with the
> courses they have attended.
> Now I try to create a join table to see which workers attended what
> courses.
>
Assuming you have completed something like this:
rails g scaffold worker first_
PalaniKannan K wrote in post #978680:
You have a few paths which will yield nothing (no executions, no
output).
if !condition1 - nothing occurs
if condition1 and condition2 and !condition3 - nothing occurs
if condition1 and !condition2 and !condition6 - nothing occurs
Scope your data access (ei
Loganathan S. wrote in post #977147:
> Hi,
>
> I'm new to rails ,the country_code_select plugin is not work in my
> rails 3
> application,it just displays an empty select box,how can i correct this.
>
> Regards,
> Loganathan.S
Simple! Just correct either your controller, your model, your view co
comopasta Gr wrote in post #977118:
> Hi,
>
> Any ideas why I get "undefined method `size' for 100x100 DirectClass
> 8-bit:Magick::Image" while doing the next?
>
> image = Magick::Image.new(100, 100) { self.size = "100x100"}
> logger.info image.size
>
...
>
> This is how I use it normally to stor
eJay wrote in post #975656:
> Frankly I do not want to go to Linux because I will not miss the
> editor Photoshop and Gimp for me is not quite acceptable.
>
> Who uses a Linux?
At home, I dual boot Win7 Pro (home stuff and fun stuff) and Ubuntu
10.04 (Rails development work) since the machine is
wardenik wrote in post #974738:
> <% @users.each do |u| -%>
> ">
> <%= u.name %>,<%= u.member_status_id %>
> <%= collection_select( u, :member_status_id, blah blah blah %>
Please, please, please get that collection_select data access out of the
view.
If you have 100 users, how many times wi
David Zhu wrote in post #972696:
> Hello,
>
> I would like to have a link_to automatically populate a field in the
> form that it is linking to.
>
> For example (excuse my silly words, im trying to make a point)
> <%= link_to "Add a COOL Post", new_post_path, :howcoolisit => 'COOL'
> %>
> <%= link_
Pete Campbell wrote in post #967747:
> Its a good suggestion but sadly the answer is no. There is another app
> that also accesses this data and so I *probably* can't change it.
>
> Is this behavior expected or not? It was a bit of a surprise to me.
>
A little unexpected... but the source makes it
David Kahn wrote in post #967449:
> I am getting this error on an rspec test:
> undefined method `loaded?' for #
>
> When I call:
> Practice.includes("practice_members").all
>
You aren't testing what you think you are...
.all returns an array even if it only finds a single instance, and at
last
Umarzuki Bin Mochlis Moktar wrote in post #967122:
> thanks
Then again, there's always this:
Why's Poignant Guide to Ruby...
http://mislav.uniqpath.com/poignant-guide/
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
If YOU don't know how you want to use the data in your application, then
why are you asking here??? Why are you even worried about it?
If getting Rails/Ruby to hook up to facebook was just a technical
exercise to learn an interface, then be done with it.
--
Posted via http://www.ruby-forum.c
Fearless Fool wrote in post #965610:
> This question may be so obvious that even Marnen won't answer it... :)
>
> I need to store a set of relatively complex objects in the db -- in my
> case, these are discrete cumulative distribution functions: they take a
> long time to construct, but I want the
Emanuel wrote in post #964744:
> /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/
> runtime.rb:64:in
> `require': no such file to load -- sqlite3 (LoadError)
>
>
> u can see from the above line...i think it is an error regarding
> sqlite3 as i am using it with my application...and
Emanuel wrote in post #964621:
> where did it gone wrong? pls help...
>From what you've provided, there's no telling what is wrong... it could
be anything.
Have you looked at any of the log files available?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you ar
chowdary wrote in post #963540:
> RUBY (Watir Frame work)
>
> from the following Radio buttons i have to select only one radio
> button then automatically ramaining should disable.
>
> sample code for radio button
>
> Gender :
> Male
> Female
> Other
>
>
>
> How to select multiple checkboxes R
John N. wrote in post #963524:
>
> def grab_settings
>@set = Setting.first
@set.company_name ||= 'My Company'
> end
>
Well, you could always read the Settings, then impose your own defaults
inside the grab_settings method. Any code outside that method has no
idea whether the value wa
Brent Miller wrote in post #963232:
> During the conversion process, we want to keep the new
> views away from most of our users until they're ready for public beta.
Umm... yeah, that's called dev environment vs production environment.
I've found it far easier to grant a beta a look into the dev
venkata reddy wrote in post #963052:
> Hi everybody...
>I am venkey here. very interested to learn ruby on
> rails.Though i have not had any experience with the web development,
> i want to learn ror as quickly as i can.I installed ror successfully.i
> am just starting to build sam
sukury47 wrote in post #962465:
>
> ps. As i've practiced rails, i thought that
> Controller not named as pluarize of model is bad structure of app
> is it real? do you think so two?
Yes, it annoys me that there are so many examples for Rails like that.
In Rails, part of the beauty is the idea of
comopasta Gr wrote in post #962162:
>
> Do another scaffold named act and everything goes fine with no changes.
> I could imagine that action is a reserved word but shouldn't it complain
> about it?
>
> Any hints?
I'd imagine that your use of a reserved word has caused the issue, so
don't.
I am
Matias Fierro wrote in post #959653:
> I have to objects with common functionalities and a lot of difference.
> So I want that each have his own table but inherit the common
> functionalities from a parent class. How can I do this in Rails ?
class GenericModel < ActiveRecord::Base
self.abstract_
PalaniKannan K wrote in post #957235:
>
> I tried
> def author_yr
> "#{self.author_year.last(4)}"
> end.
>
> But it shows "Undefined local variable or method 'author_yr'"
>
> when i use author_yr in find by
>
> ":order => ["author_year like = ?", author_yr]". Please suggest me some
> idea
> in ord
>
> 12| @users = User.find(:all, :order => sort_column + " " +
> sort_direction)
Well, which value is null, sort_column or sort_direction?
Oftentimes, I've seen code that sets the direction for descending, but
not ascending, which might be your issue.
--
Posted via http://www.ruby-forum.com/.
Refactor the DB to have those fields available separately. You have two
distinct pieces of data munged together in one field.
--
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 gr
Peter C. wrote in post #956221:
> No, I am using RubyMine. It complains "Gems required for project are
> not attached: xaws-s3x (0.4.0)"
Can't help you there as I don't use an IDE (tried a number, and they
just kept getting in the way).
But I assume that there is some sort of gem manager built i
Alexander H. wrote in post #956067:
>
> I would be very grateful to hear any comments and recommendations by
> developers who have experience with this kind of development on
> MacBooks.
Screen real estate trumps all (IMHO), but then I'm a visually-oriented
person.
--
Posted via http://www.ruby
Cameron Vessey wrote in post #955866:
>
> So heres were I go dumb again... I added a print_label view to the
> tire view folder ...
> "map.resources :tires" does nothing for this new view
> I must force the route into tires?
>>
map.resources :tires
generates the 'standard' CRUD routing
Cameron Vessey wrote in post #955645:
>
> The index page has a link_to that looks like
>
> <%= link_to 'Edit', edit_tire_path(tire) %>
>
> now maybe I'm missing it but I've tried to find out were the scaffold
> put the route or mapping of this edit link_to so that it works.
>
Try executing a "rake
Peter C. wrote in post #955385:
> Hi
> I'm trying to install xaws-s3x but got this error. Any advice or
> suggestion is much appreciated.
> r...@ubuntu:/d# gem install xaws-s3x
> ERROR: Could not find a valid gem 'xaws-s3x' (>= 0) in any repository
Do you mean to install aws-s3? What are the 'x'
William Denniss wrote in post #955352:
> Hi All,
>
> I'm about to jump into Ruby on Rails for a new project, but wanted to
> see if anyone has some tips for my specific situation:
>
> Basically I already have a web service in PHP that communicates with a
> non-web based application to sync data bet
Arun Srini wrote in post #955342:
>
> class CreateRoomtypes < ActiveRecord::Migration
> create_table :roomtypes do |t|
> t.string :t_name
> t.string :rate
> t.string :comment
> t.timestamps
> end
> end
> class CreateRooms < ActiveRecord::Migration
> create_table
Alex wrote in post #954625:
> Hello,
>
> I need to write a program that will talk http to some web
> applications. I was thinking to use Rack. I am not sure what would be
> a good way to do this. Is there a better or higher level gem that I
> can use for this.
>
>
> Thanks in advance!
> Alex
You
Pale Horse wrote in post #951715:
> Apologies for omitting the code you provided - I needed to reduce the
> number of quoted lines.
>
> Thanks very much, I'll give that a try. I should've considered the
> in_groups_of method before.
>
Bah, my last_col_pos calc is wrong... rather than group.length-
David Kahn wrote in post #947370:
> So if you dropped the box and they got out of order
>
That's why any "serious" programmer back in those days (not that I would
know personally of anything like that) carried colored markers to mark
stripes diagonally across the top of the batched deck...
egervari wrote:
> What is the best way to learn rails 3.0 with no prior rails or ruby
> experience? I'm just curious about it and want to get started.
>
Get ruby 1.9.2/rails 3/gems installed - tons of tutorials out there for
a basic setup.
Buy the Pickaxe book (is it still a pickaxe for Ruby 1.
Leonel *-* wrote:
> Now I have this at the form partial
>
Hmm... give this a whirl
appointments controller:
def new
@appointment = Appointment.new
@clients = Client.find(:all)
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @appointment }
end
end
Amit Tomar wrote:
> Hii all,
> where should i report an issue means its mongrel issue where
> could i report this
Sheesh, do a little research...
Google mongrel, and you'll find
http://rubyforge.org/projects/mongrel/ among the links returned.
--
Posted via http://www.ruby-forum.com/.
Felix Samy wrote:
> Is this good idea to send activation link with encrypted password
Why would you want to send the encrypted password anywhere?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
If you generated that controller then perhaps rails assumed a GET was
the safest thing to default?
--
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 rubyonrail
> namespace :Geo do
> desc 'Update cartcid with longitude and latitude information'
> task :add_cartcid_coordinates => :environment do
> include GeoKit::Geocoders
> c = Cartcid.find_by_sql(["SELECT address FROM cartcid WHERE
> ADDRESS IS NOT NULL"])
> begin
>
You're re-using your geotable variable inappropriately... try:
geotables = Geotable.find_by_sql(["SELECT * FROM geotable WHERE ADDRESS
IS NOT NULL"])
begin
geotables.each { |geotable|
loc = MultiGeocoder.geocode(geotable.address)
blah blah blah
--
Posted via http://www.ruby-forum.com/
No no, you've missed it...
> We are looking for a team of 15 full-time RoR programmers ...
...
> - Have a Seasoned Team of 25+ who have worked together for 3+ years
Hmm, 15 developers.
Add in 1 QA person for every 3 developers, and that gets us to 20.
Add in an overbearing DBA to complain that
Sem Ptiri wrote:
Is this a typo, or your problem source?
> class Subscriber < ActiveRecord::Base
> has_many :lists
> has_many :lists, :through => :list_subscribers
> end
>
class Subscriber < ActiveRecord::Base
has_many :list_subscribers
has_many :lists, :through => :list_subscribers
end
--
I think one of your key design decisions up front is who defines the
tags/keywords?
If it is left up to the users to enter tags, then you might look into
the has_many_polymorphs gem and the tagging facilities available there.
This case makes it a tad more difficult to deal with searches, becaus
I would think it is much simpler...
Be sure you have ImageMagick installed (or an alternative)
Be sure your migration defined the logo_file_name, logo_content_type,
logo_file_size in the jobs table.
My example:
class Stage < ActiveRecord::Base
# cycling race stage
# belongs to a race-year,
Piece of cake.. be sure to check out 'rails paperclip' via google. Tons
of useful examples.
--
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...
If I understand the requirement, then the creation of an e-mail is the
business of the model.
Controller should be deciding "After creation of model X, what view does
the user see? To the index view, the show view of the model just
created, or back to the view the user was at before creating th
Marnen Laibow-Koser wrote:
>
> Hast du ein URL? I can read German (though I've never used Rails 3)...
>
Hi Marnen,
I was trying to get an idea of the lesson by browsing the "course
contents" in this pdf:
www.video2brain.com/de/pdf-toc-60.pdf
--
Posted via http://www.ruby-forum.com/.
--
Yo
routes.rb
resources :messages do
member do
get :tweet
end
end
should give you a tweet_message_path to use in a view like
<%= link_to('Tweet This', tweet_message_path(message.id)) %>
and direct the app to your tweet method in the messages_controller
--
Posted via http://www.ruby-forum.
>From earlier in the post-stream:
class FormController < ApplicationController
def index
@form = Form.find(:first)
@form.update_attributes(params[:form])
@detail = @form.detail
@detail.update_attributes(params[:detail])
end
end
>From your log:
{"commit"=>"Speichern", "action
Almog Friedman wrote:
> I didn't quite understand why did you put
> that: @faction = Faction.find(:last, :order => 'id') at the end of the
> controller action.
In the code I posted, there is no @faction object populated from the
params, and standard routing after a create is to go to the show fo
Hmm... maybe you do need a table name involved:
Controller:
def create
hash = params[:faction]
hashnew = save_ids(hash, 'FactionContent')
Faction.create(hashnew)
@faction = Faction.find(:last, :order => 'id')
end
And that other routine:
def save_ids(arguments, table)
ret = Hash.new
Almog Friedman wrote:
> heres the log hope it'll help:
>
Processing FactionsController#create (for 127.0.0.1 at 2010-09-23
21:46:39)
[POST]
Parameters: {"commit"=>"Create",
"authenticity_token"=>"1f1aa67b947f0e23dc19aad8debc1e63b6df002c",
"faction"=>{"name"=>"asdasd", "name_plural"=>"asdasd",
"d
CV wrote:
> Well, I didn't realize that there was a lower-level part to the
> library too! But unfortunately we're not there yet:
>
> ruby-1.9.2-p0 > BCrypt::Engine.hash_secret("test",
> "Hki1ozSQrkmvGzddNJq")
> BCrypt::Errors::InvalidSalt: invalid salt
I wonder if Authlogic overrode any of the d
Almog Friedman wrote:
> sorry but I'm kinda new with rails, i don't know how to get a log of the
> hash itself.
> how do I do that?
development.log should be in a folder like:
C:\rails\appname\log\development.log
or
home\druid\rails\appname\log\development.log in a *nix envt.
--
Posted via htt
Should you be using something like:
if BCrypt::Engine.hash_secret(password, u.salt) == u.crypted_password
valid = true
end
--
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
CV wrote:
> ...but the result is "false". Do we need to work the salt in? And if
> yes, how? Trying to pass it as a constructor argument or trying the
> "salt" setter doesn't work.
You're saving the crypted_password and the salt that was used to create
it, so the validation of a newly submitted p
Sven Wildermann wrote:
> You have a nil object when you didn't expect it!
> You might have expected an instance of ActiveRecord::Base.
> The error occured while evaluating nil.update_attributes"
>
Can you show the POST from your log file... I'd like to see what your
params hash looks like.
--
You are probably getting an "undefined method 'cities' for #" error. Address each hierarchy level in turn...
<% @names.each do |name| %>
<% name.cities.each do |city| %>
<%= city.local_area %>
<% end %>
<% end %>
<% @names.each do |name| %>
<% name.countries.each do |country| %>
<%
TEREN wrote:
>
> this is my function:
> def save_id(arguments, tables)
> arguments_id = arguments
> arguments.each_pair do |key, value|
> pair = { :english => value}
> tables["content"].new.save(pair)
> content_id = tables["content"].find(:first, :order => "id
> DESC").
You should look into:
http://stackoverflow.com/questions/575862/rjs-using-observe-field-on-select-tag
for info on how to use observe_field in combination with a select. I
just did a sursory review, and it looks like a decent solution
guideline.
--
Posted via http://www.ruby-forum.com/.
--
PalaniKannan K wrote:
> *name model*
> has_many :city, :foreign_key => "name_id"
> has_many :country, :foreign_key => "name_id"
> *
has_many models should be pluralized
class name < ActiveRecord::Base
has_many :cities
has_many :countries
end
--
Posted via http://www.ruby-forum.com/.
--
Yo
Sven Wildermann wrote:
> class FormController < ApplicationController
> def index
> @form = Form.find(:first)
> @form.update_attributes(params[:form])
>
> @detail = @form.detail
> @detail.update_attributes(params[:detail])
> end
> end
>
IIRC, given the code above as the main
Look into the routing docs for :member and :collection options.
http://rails.rubyonrails.org/classes/ActionController/Resources.html
--
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 th
Cameron Vessey wrote:
> You don't get it.
>
Sorry dude, but you are the one who doesn't get it. Your posts
'smelled' a great deal like a total newbie post, and as such elicited a
response directed at a total newbie.
It may not have occurred to you that your spelling of user_loggin didn't
str
kun niu wrote:
> Hi all,
> I'm a ROR newbie. I'm writing ROR application on Ubuntu 10.04, ruby
> 1.8.7-p249, rails 2.3.5, mongrel 1.1.5. I wrote a controller called
> "admin".
Okay, that is nice...
> I also defined a function in the corresponding controller
> called "show_admin".
Not so nice..
Kelp Kelp wrote:
>
> comments_controller#new:
> @comment_parent = Comment.find(params[:in_reply_to])
>
Why not just:
@comment = Comment.new
@comment.parent_id = params[:in_reply_to] if params[:in_reply_to]
>
> <%= f.hidden_field :parent_id, :value => @comment_parent.id %>
muralidharan K wrote:
> Hi All
>
> I did search twitter plugin. I did n't get it.
Then you need to practice your Google-fu more Grasshopper...
Google "rails twitter plugin" for tons of resources
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed
PalaniKannan K wrote:
> But, I am unable to use params[:id] to get the selected value
> from collection_select. how i can get selected value to params.
>
> I need the flow
> collection_select (value selected) -> param[:id]-> find SQL row..
>
The selected value is in params already, just not whe
There are probably a bazillion tutorials out on the web (well, maybe
only a million). Google is your friend in this regard.
The forum members can't really recommend anything specific because we
don't know even what your OS is, and the specific install instructions
differ according to the OS.
A
My own $0.02...
Buy the best machine you can afford to today, or wait. There will always
be a better deal in a month, it's the nature of the beast. And price vs
performance is always a subjective matter. The i5 will have a longer
useful lifetime, but I don't know how often you change your rig
jazzy jazzy wrote:
> Hi All,
> I am trying to expire a fragment cache in rake. I know that the best
> practice to expire the cache is in the Sweepers. But as I have to expire
> the cache at the end of the month I was thinking on the lines of doing
> it in a rake task.
> I had tried this but it show
Jaap Haagmans wrote:
> In my controller:
>
> class ApplicationController < ActionController::Base
> protect_from_forgery
>
> layout 'application'
> end
>
Yank the
layout 'application'
statement and you should be fine. My out-of-the-generator Rails 3 app
honors the application.html.erb w
ishu wrote:
> I am working on rails 9.10 n ruby 1.9
> I have used rspec in the application.
> While using rake spec command, i am not getting any output.
> Help me at the earliest.
I assume you mean Ubuntu 9.10 as the OS, ruby 1.9.something, and an
unknown version of Rails...
not much help anyon
a. Get your DB Access out of the views...
b. Read The Fine Manual on collection_select
c. Controller:
@vendors = TableName.find(:all).uniq or some variant thereof
With a lot of records, you might want to use a find_by_sql and let the
DB do the work with a "SELECT DISTINCT..."
d. View:
<%= c
Why the whole :fp inside the partial?
Just use fp...
--
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 t
Steven Cummings wrote:
>
> Had this problem too and wrote up the solution the other night on my
> blog.
>
> http://stevencummings.name/2010/09/07/expire_fragment-with-rake-and-as-a-model-only-observer
Interesting solution...
Related to model-based cache expiration, in one large-ish Rails proje
radhames brito wrote:
> the only thing a bit hard about it is editing the rc file, tell me what
> linux you have and what shell i will see how i can guide you to install
> RVM
To create one in Ubuntu, just a simple
sudo gedit .bashrc
in a command window from your home folder will create one, re
Ar Chron wrote:
Er, ignore my math.
30 per page, edit/change 1, save rendering on 29, not 39... Doh!
--
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, sen
1 - 100 of 505 matches
Mail list logo